2000-03-29 17:08:33 +04:00
|
|
|
#!/bin/sh
|
|
|
|
PROG=${1-UNKNOWN}
|
|
|
|
|
|
|
|
ConfStr="$PROG"
|
|
|
|
|
2000-04-24 18:26:36 +04:00
|
|
|
ConfStr="$ConfStr 4.0.99i"
|
2000-03-29 17:08:33 +04:00
|
|
|
|
|
|
|
case "" in
|
|
|
|
'') ;;
|
|
|
|
*) ConfStr="${ConfStr}-r" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
ConfStr="$ConfStr `date`"
|
|
|
|
|
|
|
|
if [ ! -f .version ]; then
|
|
|
|
echo 0 > .version
|
|
|
|
fi
|
|
|
|
RUN="`cat .version`"
|
|
|
|
RUN="`expr $RUN + 1`"
|
|
|
|
echo $RUN > .version
|
|
|
|
|
|
|
|
ConfStr="$ConfStr (${RUN})"
|
|
|
|
|
|
|
|
echo "Version <${ConfStr}>";
|
|
|
|
|
|
|
|
rm -f version.c
|
|
|
|
cat > version.c << -EoF-
|
|
|
|
/*
|
|
|
|
* version file for $PROG
|
|
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
const char * Version = "${ConfStr}";
|
|
|
|
-EoF-
|