summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2013-09-27 12:17:48 +0200
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2013-09-27 12:20:16 +0200
commite70a5746d551aaa8f579c50c09a14e528e4cfcfc (patch)
tree9ab410e9f5ce96592c78fac30545d74ed441c8b9 /tools
parente4e9c79d93f2953f34c702a6e466d6ef790a0ca4 (diff)
downloadlasso-e70a5746d551aaa8f579c50c09a14e528e4cfcfc.tar.gz
lasso-e70a5746d551aaa8f579c50c09a14e528e4cfcfc.tar.xz
lasso-e70a5746d551aaa8f579c50c09a14e528e4cfcfc.zip
tools/git-version-gen: keep the g before the git commit number
Diffstat (limited to 'tools')
-rwxr-xr-xtools/git-version-gen3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/git-version-gen b/tools/git-version-gen
index 34682473..116af68e 100755
--- a/tools/git-version-gen
+++ b/tools/git-version-gen
@@ -185,7 +185,7 @@ then
# Change the first '-' to a '.', so version-comparing tools work properly.
# Remove the "g" in git describe's output string, to save a byte.
- v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
+ v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-g/'`;
v_from_git=1
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
v=UNKNOWN
@@ -203,6 +203,7 @@ if test "x$v_from_git" != x; then
git update-index --refresh > /dev/null 2>&1
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
+
case "$dirty" in
'') ;;
*) # Append the suffix only if there isn't one already.