X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=config%2Fversion.sh;h=5a9628c250354e62d8acf00c3e1dc9c83577fe7b;hp=6257186f86dfca5a2d7bb1f35881f73d1f2799d3;hb=612e67b21d1c9a6cc5db0e2903ddaeb5f2fbe2a0;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b diff --git a/config/version.sh b/config/version.sh index 6257186..5a9628c 100755 --- a/config/version.sh +++ b/config/version.sh @@ -1,15 +1,13 @@ #!/bin/sh # -# version.sh -- script to create version string(s) for nmh. +# version.sh -- script to create version string(s) for mmh. # # You need to pass the script the version number to use. # -# $Id$ -# if [ -z "$1" ]; then - echo "usage: version.sh VERSION" 1>&2 - exit 1 + echo "usage: version.sh VERSION" 1>&2 + exit 1 fi VERSION=$1 @@ -20,25 +18,27 @@ HOSTNAME=unknown # Find out the name of the host we are compiling on for prog in uname hostname do - for dir in $PATH - do - if [ ! -f $dir/$prog ]; then - continue + for dir in $PATH + do + if [ ! -f $dir/$prog ]; then + continue + fi + case $prog in + uname) + HOSTNAME=`$prog -n` + ;; + hostname) + HOSTNAME=`$prog` + ;; + esac + break + done + if [ X"$HOSTNAME" != X -a X"$HOSTNAME" != Xunknown ]; then + break fi - case $prog in - uname) HOSTNAME=`$prog -n` - ;; - hostname) HOSTNAME=`$prog` - ;; - esac - break - done - if [ X"$HOSTNAME" != X -a X"$HOSTNAME" != Xunknown ]; then - break - fi done IFS=" " -echo "char *version_str = \"nmh-$VERSION [compiled on $HOSTNAME at `date`]\";" -echo "char *version_num = \"nmh-$VERSION\";" +echo "char *version_str = \"mmh-$VERSION [compiled on $HOSTNAME at `date`]\";" +echo "char *version_num = \"mmh-$VERSION\";"