X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=config%2Fversion.sh;h=63963061dec047556bd082de8e8b6c0e95fe75c3;hp=61d9637ac062dc4215a4fc5c58daa96d78a25f3b;hb=18591f8e001ecedbee48a51c1d1f08ebaa1c15c8;hpb=a485ed478abbd599d8c9aab48934e7a26733ecb1 diff --git a/config/version.sh b/config/version.sh index 61d9637..6396306 100755 --- a/config/version.sh +++ b/config/version.sh @@ -1,6 +1,6 @@ #!/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. # @@ -11,34 +11,8 @@ if [ -z "$1" ]; then fi VERSION=$1 -OFS="$IFS" -IFS=: -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 - 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 +git_info="$(git show --pretty'=format: [%h -- %cD]' HEAD | head -n1)" -IFS=" " - -echo "char *version_str = \"nmh-$VERSION [compiled on $HOSTNAME at `date`]\";" -echo "char *version_num = \"nmh-$VERSION\";" +echo "char *version_str = \"mmh-${VERSION}${git_info}\";" +echo "char *version_num = \"mmh-$VERSION\";"