Browse Source

udpate testme to display correct version when run out of repository

Steffen Jaeckel 12 years ago
parent
commit
eb9bad79bf
1 changed files with 6 additions and 1 deletions
  1. 6 1
      testme.sh

+ 6 - 1
testme.sh

@@ -11,7 +11,12 @@ fi
 echo "date="`date`
 echo "date="`date`
 
 
 # output version
 # output version
-echo "Testing verion" `grep "^VERSION=" makefile | sed "s/.*=//"`
+version=$(git describe --tags --always --dirty 2>/dev/null)
+if [ ! -e ".git" ] || [ -z $version ]
+then
+	version=$(grep "^VERSION=" makefile | sed "s/.*=//")
+fi
+echo "Testing version:" $version
 #grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"`
 #grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"`
 
 
 # get uname 
 # get uname