1999-12-09 13:01:21 +00:00
|
|
|
#!@PATH_SH@
|
|
|
|
PROG=${1-UNKNOWN}
|
|
|
|
|
|
|
|
ConfStr="$PROG"
|
|
|
|
|
2001-08-29 14:35:15 +00:00
|
|
|
ConfStr="$ConfStr @VERSION@"
|
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
case "@LIBRSAREF@" in
|
2001-08-29 14:35:15 +00:00
|
|
|
'')
|
|
|
|
case "@AUTOKEY@" in
|
|
|
|
'') ;;
|
|
|
|
*) ConfStr="${ConfStr}-a" ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*) ConfStr="${ConfStr}-r" ;;
|
1999-12-09 13:01:21 +00:00
|
|
|
esac
|
|
|
|
|
2001-08-29 14:35:15 +00:00
|
|
|
ConfStr="$ConfStr `LC_TIME=C date`"
|
1999-12-09 13:01:21 +00:00
|
|
|
|
|
|
|
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-
|