On 5/30/22 20:55, Mike Fulton wrote:
/bin/sh gnulib/gnulib-tool –update
The error is on line 1571, where the z/OS shell (an older POSIX ‘sh’) issues:
FSUM7728 bad ${} modifier
I must be missing context, as current gnulib/gnulib-tool's line 1571
says "autoconf_minversion=" which doesn't have anything to do with ${}
modifiers. And although I do see the following code starting on line
1966, I don't see how the failure occurs because the funny ${} modifier
is inside a single-quoted string that should not be eval'ed.
Is the problem that the z/OS shell accepts ${f//o/e} but rejects
${1//[!a-zA-Z0-9_]/_}? If so, the fix to gnulib-tool should be simple.
-----
if (f=foo; eval echo '${f//o/e}') < /dev/null 2>/dev/null | grep
fee >/dev/null; then
# Bash 2.0 and newer, ksh, and zsh support the syntax
# ${param//pattern/replacement}
# as a shorthand for
# `echo "$param" | sed -e "s/pattern/replacement/g"`.
# Note: The 'eval' is necessary for dash and NetBSD /bin/sh.
eval 'func_cache_var ()
{
cachevar=c_${1//[!a-zA-Z0-9_]/_}
}'
else
func_cache_var ()
{
case $1 in
*[!a-zA-Z0-9_]*)
cachevar=c_`echo "$1" | LC_ALL=C sed -e
's/[^a-zA-Z0-9_]/_/g'` ;;
*)
cachevar=c_$1 ;;
esac
}
fi