summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/git-version-gen5
1 files changed, 3 insertions, 2 deletions
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index c433c262d..4e8ffc6ea 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -42,8 +42,9 @@ elif test -d .git \
*) (exit 1) ;;
esac
then
- # Remove the "g" in git-describe's output string.
- v=`echo "$v" | sed 's/\(.*\)-g/\1-/'`;
+ # 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-/'`;
else
v=UNKNOWN
fi