version.sh: replace -g with -git-

git describe prefixes the sha1 commit hash with -g, which is exactly what
we're after. this change gets rid of the confusing "g" in the commit hash
and allows tag names that include "-".
This commit is contained in:
rofl0r 2020-09-27 15:41:54 +01:00
parent c74fe57262
commit 4dfac863a5

View File

@ -9,7 +9,7 @@ if test -d "${GIT_DIR}" ; then
if test "x$?" != x0 ; then
sed 's/$/-git/' < VERSION
else
printf "%s\n" "$gitstr" | sed -e 's/-/-git-/'
printf "%s\n" "$gitstr" | sed -e 's/-g/-git-/'
fi
else
sed 's/$/-git/' < VERSION