From: Nick Bowler Date: Tue, 9 Mar 2021 01:39:09 +0000 (-0500) Subject: Avoid nonportable ${x%%y} substitutions in DX_LINGUAS. X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/commitdiff_plain/19bb62393cbee31cd377d4e9bd1b493ca91528bd Avoid nonportable ${x%%y} substitutions in DX_LINGUAS. Using ${x%%y} substitutions is not portable: in particular it is not supported by Solaris /bin/sh (or heirloom-sh). Let's use a more portable construct instead. --- diff --git a/m4/linguas.m4 b/m4/linguas.m4 index c6ad973..eb6701e 100644 --- a/m4/linguas.m4 +++ b/m4/linguas.m4 @@ -32,7 +32,12 @@ if test -f "$srcdir/po/LINGUAS"; then # Ensure that if "la_CC"-style code is requested then so is plain "la". printf '%s\n' "$arg" case $arg in - *_*) printf '%s\n' "${arg%%_*}" ;; + *_*) + save_IFS=$IFS; IFS=_ + set x $arg + IFS=$save_IFS + AS_ECHO(["${2}"]) + ;; esac done } | sort -u >conftest.ena