mkver revision 1.3
1#!/bin/sh 2PROG=${1-UNKNOWN} 3 4ConfStr="$PROG" 5 6ConfStr="$ConfStr 4.2.7p404" 7 8case "$CSET" in 9 '') ;; 10 *) ConfStr="$ConfStr@$CSET" ;; 11esac 12 13case "o" in 14 '') ;; 15 *) ConfStr="${ConfStr}-o" ;; 16esac 17 18ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`" 19 20if [ ! -f .version ]; then 21 echo 0 > .version 22fi 23RUN="`cat .version`" 24RUN="`expr $RUN + 1`" 25echo $RUN > .version 26 27ConfStr="$ConfStr (${RUN})" 28 29echo "Version <${ConfStr}>"; 30 31rm -f version.c 32cat > version.c << -EoF- 33/* 34 * version file for $PROG 35 */ 36#include <config.h> 37const char * Version = "${ConfStr}"; 38-EoF- 39