Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGIT-VERSION-GEN8
1 files changed, 5 insertions, 3 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index e3cd9fa094..72201be57c 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -5,9 +5,11 @@ DEF_VER=v1.1.GIT
# First try git-describe, then see if there is a version file
# (included in release tarballs), then default
-VN=$(git-describe --abbrev=4 HEAD 2>/dev/null | sed -e 's/-/./g') ||
-VN=$(cat version) ||
-VN="$DEF_VER"
+if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then
+ VN=$(echo "$VN" | sed -e 's/-/./g');
+else
+ VN=$(cat version) || VN="$DEF_VER"
+fi
VN=$(expr "$VN" : v*'\(.*\)')