From 10ecf5182a0f63d79a44b953483ecfbb54d29bcb Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 8 Mar 2022 16:44:17 +0000 Subject: [PATCH] contrib: Fix gcc-descr script [PR102664] POSIX expr does not support the 'match' keyword, so the git-descr.sh scripts should use ':' instead. contrib/ChangeLog: PR other/102664 * git-descr.sh: Use portable form of expr match. --- contrib/git-descr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/git-descr.sh b/contrib/git-descr.sh index eb25814..ba5d711 100755 --- a/contrib/git-descr.sh +++ b/contrib/git-descr.sh @@ -23,7 +23,7 @@ elif test x$long = xyes; then r=$(git describe --all --abbrev=40 --match 'basepoints/gcc-[0-9]*' $c | sed -n 's,^\(tags/\)\?basepoints/gcc-,r,p') else r=$(git describe --all --abbrev=14 --match 'basepoints/gcc-[0-9]*' $c | sed -n 's,^\(tags/\)\?basepoints/gcc-,r,p'); - expr match ${r:-no} 'r[0-9]\+$' >/dev/null && r=${r}-0-g$(git rev-parse $c); + expr ${r:-no} : 'r[0-9]\+$' >/dev/null && r=${r}-0-g$(git rev-parse $c); fi; if test -n $r; then o=$(git config --get gcc-config.upstream); -- 2.7.4