summaryrefslogtreecommitdiff
path: root/GIT-VERSION-GEN
diff options
context:
space:
mode:
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-xGIT-VERSION-GEN5
1 files changed, 4 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 1056b7c..d6d1ae0 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -7,8 +7,11 @@ DEF_VER=v1.2.GIT
# (included in release tarballs), then default
if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then
VN=$(echo "$VN" | sed -e 's/-/./g');
-else
+elif test -f version
+then
VN=$(cat version) || VN="$DEF_VER"
+else
+ VN="$DEF_VER"
fi
VN=$(expr "$VN" : v*'\(.*\)')