From dd76853a033aa68be7c6a32b0f8636012962632f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Aug 2017 17:03:55 -0700 Subject: [PATCH] git-version-gen: port to Solaris 10 Problem reported by Dagobert Michelsen in: http://lists.gnu.org/archive/html/grep-devel/2017-08/msg00002.html * build-aux/git-version-gen (v_from_git): Use expr instead of shell substitution. --- ChangeLog | 8 ++++++++ build-aux/git-version-gen | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb71b1ad6f..4c34008054 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-08-20 Paul Eggert + + git-version-gen: port to Solaris 10 + Problem reported by Dagobert Michelsen in: + http://lists.gnu.org/archive/html/grep-devel/2017-08/msg00002.html + * build-aux/git-version-gen (v_from_git): + Use expr instead of shell substitution. + 2017-08-19 Bruno Haible host-cpu-c-abi: Improve detection of MIPS ABI. diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index a8818b217b..b41f891cee 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,6 +1,6 @@ #!/bin/sh # Print a version string. -scriptversion=2017-08-07.06; # UTC +scriptversion=2017-08-20.18; # UTC # Copyright (C) 2007-2017 Free Software Foundation, Inc. # @@ -167,7 +167,8 @@ then # tag or the previous older version that did not? # Newer: v6.10-77-g0f8faeb # Older: v6.10-g0f8faeb - case ${v#-g*} in + vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v + case $vprefix in *-*) : git describe is probably okay three part flavor ;; *) : git describe is older two part flavor -- 2.11.4.GIT