From 495073425e93b2d53615d07b241ceab26cfc7464 Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Sat, 20 Jul 2019 00:06:17 +0200 Subject: [PATCH] Make build.sh Bash 3.x compatible. The highest version of bash shipped by vanilla macOS is 3.2, and it will stay like that for the foreseeable future (bash being removed as default in 10.15 is a strong indicator for that). The build.sh script used Bash 4.x syntax for enumerating available translations - this patch dials back the clock to Bash 3.x making things work again on macOS and (hopefully) still maintaining functionality on other platforms that use a newer version of bash. --- workspace/TS100/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/workspace/TS100/build.sh b/workspace/TS100/build.sh index 06a25111..0efcf1ff 100755 --- a/workspace/TS100/build.sh +++ b/workspace/TS100/build.sh @@ -83,9 +83,7 @@ echo "*********************************************" # Calculate available languages for f in "$TRANSLATION_DIR"/translation_*.json do - lang_json=${f#*/translation_} # Remove ".../translation_" - lang=${lang_json%.json} # Remove ".json" - AVAILABLE_LANGUAGES+=("${lang^^}") # Convert to uppercase + AVAILABLE_LANGUAGES+=(`echo $f | tr "[:lower:]" "[:upper:]" | sed "s/[^_]*_//" | sed "s/\.JSON//g"`) done # Checking requested language