From: Bruno Haible Date: Tue, 16 Jul 2024 12:52:29 +0000 (+0200) Subject: lang-bash: Fix handling of macOS bash. X-Git-Tag: v0.23~249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2705efb0c3a2382cd6cd12ceb12f582595385a;p=thirdparty%2Fgettext.git lang-bash: Fix handling of macOS bash. * gettext-tools/tests/lang-bash: Don't test whether bash is localized. Instead, on macOS, test only in the UTF-8 locale. --- diff --git a/gettext-tools/tests/lang-bash b/gettext-tools/tests/lang-bash index 268ec3264..65c6eb9f2 100755 --- a/gettext-tools/tests/lang-bash +++ b/gettext-tools/tests/lang-bash @@ -95,6 +95,10 @@ esac # Test which of the fr_FR locales are installed. : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} +# bash on macOS supports only UTF-8 locales. +case "$host_os" in + darwin*) LOCALE_FR=none ;; +esac if test $LOCALE_FR != none; then LC_ALL=$LOCALE_FR ../testlocale case $? in @@ -120,19 +124,6 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then Exit 77 fi -case "$host_os" in - darwin*) - if test $LOCALE_FR != none; then - LC_ALL=$LOCALE_FR bash --help \ - | grep '^Utilisation' > /dev/null 2>&1 || Exit 77 - fi - if test $LOCALE_FR_UTF8 != none; then - LC_ALL=$LOCALE_FR_UTF8 bash --help \ - | grep '^Utilisation' > /dev/null 2>&1 || Exit 77 - fi - ;; -esac - # Expected result when bash is built without i18n support. cat <<\EOF > prog.nok 'Your command, please?', asked the waiter.