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.
This commit is contained in:
Jonathan Wakely
2022-03-08 16:44:17 +00:00
parent 058d19b42a
commit 10ecf5182a

View File

@@ -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);