3 # version.sh -- script to create version string(s) for nmh.
5 # You need to pass the script the version number to use.
9 echo "usage: version.sh VERSION" 1>&2
18 # Find out the name of the host we are compiling on
19 for prog in uname hostname
23 if [ ! -f $dir/$prog ]; then
27 uname) HOSTNAME=`$prog -n`
29 hostname) HOSTNAME=`$prog`
34 if [ X"$HOSTNAME" != X -a X"$HOSTNAME" != Xunknown ]; then
41 echo "char *version_str = \"nmh-$VERSION [compiled on $HOSTNAME at `date`]\";"
42 echo "char *version_num = \"nmh-$VERSION\";"