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