1999-12-13 14:09:56 +00:00
|
|
|
#!/bin/sh
|
2001-08-29 15:03:54 +00:00
|
|
|
#
|
1999-12-13 14:09:56 +00:00
|
|
|
# $FreeBSD$
|
2001-08-29 15:03:54 +00:00
|
|
|
#
|
1999-12-13 14:09:56 +00:00
|
|
|
PROG=${1-UNKNOWN}
|
|
|
|
|
2019-12-12 01:33:45 +00:00
|
|
|
: ${ECHO:=echo}
|
|
|
|
|
1999-12-13 14:09:56 +00:00
|
|
|
ConfStr="$PROG"
|
|
|
|
|
2018-08-21 02:38:07 +00:00
|
|
|
ConfStr="$ConfStr 4.2.8p12"
|
2002-10-29 20:20:36 +00:00
|
|
|
|
|
|
|
case "$CSET" in
|
|
|
|
'') ;;
|
|
|
|
*) ConfStr="$ConfStr@$CSET" ;;
|
|
|
|
esac
|
2001-08-29 15:03:54 +00:00
|
|
|
|
1999-12-13 14:09:56 +00:00
|
|
|
case "" in
|
2001-08-29 15:03:54 +00:00
|
|
|
'')
|
|
|
|
case "1" in
|
|
|
|
'') ;;
|
|
|
|
*) ConfStr="${ConfStr}-a" ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*) ConfStr="${ConfStr}-r" ;;
|
1999-12-13 14:09:56 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
if [ ! -f .version ]; then
|
|
|
|
echo 0 > .version
|
|
|
|
fi
|
|
|
|
RUN="`cat .version`"
|
|
|
|
RUN="`expr $RUN + 1`"
|
|
|
|
echo $RUN > .version
|
|
|
|
|
|
|
|
ConfStr="$ConfStr (${RUN})"
|
|
|
|
|
2019-12-12 01:33:45 +00:00
|
|
|
${ECHO} "Version <${ConfStr}>";
|
1999-12-13 14:09:56 +00:00
|
|
|
|
|
|
|
rm -f version.c
|
|
|
|
cat > version.c << -EoF-
|
|
|
|
/*
|
|
|
|
* version file for $PROG
|
|
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
const char * Version = "${ConfStr}";
|
|
|
|
-EoF-
|