about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbuildver.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/buildver.sh b/buildver.sh
index be2517b..879bedc 100755
--- a/buildver.sh
+++ b/buildver.sh
@@ -1,4 +1,7 @@
 #!/bin/sh
-if [ -d .git ]; then
+
+CURDIR=$(dirname $0)
+if [ -d $CURDIR/.git ]; then
+	cd $CURDIR
 	git describe --tags | tr -d '\n'
 fi