Mercurial > gnulib
diff build-aux/git-version-gen @ 19037:b19c2e91a4c8
git-version-gen: port better to older Git
Work even if the hash contains more than 4 digits.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sun, 06 Aug 2017 09:21:05 -0700 |
parents | 125fe2f313c6 |
children | bb20c8393f79 |
line wrap: on
line diff
--- a/build-aux/git-version-gen Sun Aug 06 08:26:03 2017 +0200 +++ b/build-aux/git-version-gen Sun Aug 06 09:21:05 2017 -0700 @@ -1,6 +1,6 @@ #!/bin/sh # Print a version string. -scriptversion=2017-08-06.05; # UTC +scriptversion=2017-08-06.16; # UTC # Copyright (C) 2007-2017 Free Software Foundation, Inc. # @@ -167,9 +167,9 @@ # tag or the previous older version that did not? # Newer: v6.10-77-g0f8faeb # Older: v6.10-g0f8faeb - case $v in - *-*-g????) : git describe is okay three part flavor ;; - *-g????) + case ${v#-g*} in + *-*) : git describe is probably okay three part flavor ;; + *) : git describe is older two part flavor # Recreate the number of commits and rewrite such that the # result is the same as if we were using the newer version