summaryrefslogtreecommitdiffstats
path: root/version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'version.sh')
-rwxr-xr-xversion.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/version.sh b/version.sh
index a907dd26ad..90a08ac10e 100755
--- a/version.sh
+++ b/version.sh
@@ -7,7 +7,7 @@ test "$1" && extra="-$1"
# Extract revision number from file used by daily tarball snapshots
# or from "git describe" output
git_revision=$(cat snapshot_version 2> /dev/null)
-test $git_revision || test ! -d .git || git_revision=`git rev-parse --short HEAD`
+test $git_revision || test ! -e .git || git_revision=`git rev-parse --short HEAD`
git_revision=$(expr "$git_revision" : v*'\(.*\)')
test $git_revision || git_revision=UNKNOWN