#!/bin/sh # # Write a version stamp into $1. $2 is the version string and $3 is # the compiler name. Works on Linux; not tested on any other system. # # Last edited: Thu Jan 14 19:32:42 1999 by piumarta (Ian Piumarta) on lebrac if [ -f $1 ]; then SERIAL=`head -1 $1 | cut -d ' ' -f 3 | sed 's/;//'` SERIAL=`expr $SERIAL + 1` else SERIAL=1 fi if expr "$3" : ".*g++" >/dev/null ; then CC=`$3 -v 2>&1 | tail -1` else CC=$3 fi cat <<_EOF > $1 int j_serial= $SERIAL; char *j_version= "$2"; char *j_date= "`date`"; char *j_cc_version= "$CC"; char *j_ux_version= "`uname -a`"; _EOF