#!/bin/sh # # $FreeBSD$ # PROG=${1-UNKNOWN} ConfStr="$PROG" ConfStr="$ConfStr 4.1.0" case "" in '') case "1" in '') ;; *) ConfStr="${ConfStr}-a" ;; esac ;; *) ConfStr="${ConfStr}-r" ;; esac ConfStr="$ConfStr `LC_ALL=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 const char * Version = "${ConfStr}"; -EoF-