From 65601372339c088bf710d52a26e63d901f301be5 Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Sun, 6 Aug 2023 20:50:48 +0100 Subject: [PATCH] Do not fail the test if msgfmt was not available, as that would prevent localisation files being installed. --- tests/Bug_-_Install_all_files.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/Bug_-_Install_all_files.sh b/tests/Bug_-_Install_all_files.sh index a0ebc1e..7582a9c 100644 --- a/tests/Bug_-_Install_all_files.sh +++ b/tests/Bug_-_Install_all_files.sh @@ -44,9 +44,15 @@ if grep "^CATALOGS" "${makeDir}/Makefile" 2>/dev/null | cut -d = -f 2 | grep -Fq exitStatus=1 fi else - # There should always be some message catalogue files defined. - echo "no localisation files defined in the Makefile (\$CATALOGS is empty)" - exitStatus=1 + # There should always be some message catalogue files defined, if + # msgfmt is available. + if command -v msgfmt >/dev/null 2>&1 || command -v gmsgfmt >/dev/null 2>&1; then + echo "no localisation files defined in the Makefile (\$CATALOGS is empty)" + exitStatus=1 + else + echo "no \`msgfmt', so no localisation files installed" + test "${exitStatus}" = 0 && exitStatus=2 + fi fi rm -rf "${testInstallDir}"