1#!/bin/sh 2# 3# 4PROG=${1-UNKNOWN} 5 6: ${ECHO:=echo} 7 8ConfStr="$PROG" 9 10ConfStr="$ConfStr 4.2.8p16" 11 12case "$CSET" in 13 '') ;; 14 *) ConfStr="$ConfStr@$CSET" ;; 15esac 16 17case "" in 18 '') 19 case "1" in 20 '') ;; 21 *) ConfStr="${ConfStr}-a" ;; 22 esac 23 ;; 24 *) ConfStr="${ConfStr}-r" ;; 25esac 26 27if [ ! -f .version ]; then 28 echo 0 > .version 29fi 30RUN="`cat .version`" 31RUN="`expr $RUN + 1`" 32echo $RUN > .version 33 34ConfStr="$ConfStr (${RUN})" 35 36${ECHO} "Version <${ConfStr}>"; 37 38rm -f version.c 39cat > version.c << -EoF- 40/* 41 * version file for $PROG 42 */ 43#include <config.h> 44const char * Version = "${ConfStr}"; 45-EoF- 46