summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0cd5da5)
raw | patch | inline | side by side (parent: 0cd5da5)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 2 Mar 2006 22:38:44 +0000 (14:38 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 3 Mar 2006 00:42:39 +0000 (16:42 -0800) |
Now this is really a corner case, but if you have the git source
tree from somewhere other than the official tarball, you do not
have version file. And if git-describe does not work for you
(maybe you do not have git yet), we spilled an error message
from "cat version".
Signed-off-by: Junio C Hamano <junkio@cox.net>
tree from somewhere other than the official tarball, you do not
have version file. And if git-describe does not work for you
(maybe you do not have git yet), we spilled an error message
from "cat version".
Signed-off-by: Junio C Hamano <junkio@cox.net>
GIT-VERSION-GEN | patch | blob | history |
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 1056b7c817f8578348120f64ad7047754bf688df..d6d1ae0338085d8d3ea567d8007f05ab5f2ee554 100755 (executable)
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
# (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*'\(.*\)')