freebsd-dev/usr.sbin/ntp/scripts/mkver
ache e3ba4f74b7 Fix date again.
Previous fix was overwritten by new commits.
2000-02-01 04:23:35 +00:00

33 lines
473 B
Bash
Executable File

#!/bin/sh
# $FreeBSD$
PROG=${1-UNKNOWN}
ConfStr="$PROG"
case "" in
'') ;;
*) ConfStr="$ConfStr RSAREF" ;;
esac
ConfStr="$ConfStr 4.0.99b `LC_TIME=C 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-