diff --git a/libratbox/src/version.c.SH b/libratbox/src/version.c.SH new file mode 100644 index 0000000..62489ca --- /dev/null +++ b/libratbox/src/version.c.SH @@ -0,0 +1,86 @@ +#!/bin/sh + +# $Id: version.c.SH 24870 2008-01-10 16:51:01Z androsyn $ + +spitshell=cat +package=libratbox + +echo "Extracting $package/src/version.c..." + +if test -r version.c.last +then + generation=`sed -n 's/^const char \*generation = \"\(.*\)\";/\1/p' < version.c.last` + if test ! "$generation" ; then generation=0; fi +else + generation=0 +fi + +generation=`expr $generation + 1` + +uname=`uname -a` + +creation=`date | \ +awk '{if (NF == 6) \ + { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \ +else \ + { print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'` + +$spitshell >version.c <> version.c +done +$spitshell >>version.c <