]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix #1596 - some version of git don't like describe in subdir
authorAdam Sutton <dev@adamsutton.me.uk>
Mon, 4 Feb 2013 14:11:07 +0000 (14:11 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Mon, 4 Feb 2013 14:11:07 +0000 (14:11 +0000)
support/version

index 7d5c40eada529b9b775ecbf1f8079a15df78dac0..68d4fc856446930fae9f3e604c6b6779e5f65a17 100755 (executable)
@@ -8,11 +8,11 @@ FILE=$1
 
 # Calculate version
 if [ -d ".git" ]; then
-    VER=$(cd $(dirname $0); git describe --dirty --match "v*" 2> /dev/null)
+    VER=$(cd $(dirname $0)/..; git describe --dirty --match "v*" 2> /dev/null)
     if [ $? -ne 0 ]; then
         # Git describe failed, maybe "--dirty" option is not available
         # Adding "-unknown" postfix to mark this situation
-        VER=$(cd $(dirname $0); git describe --match "v*" 2> /dev/null)-unknown
+        VER=$(cd $(dirname $0)/..; git describe --match "v*" 2> /dev/null)-unknown
     fi
     VER=$(echo $VER | sed "s/^v//" | sed "s/-\([0-9]*\)-\(g[0-9a-f]*\)/.\1~\2/")
 else