1
0
forked from me/IronOS

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.
This commit is contained in:
Alessandro Gatti
2019-07-20 00:06:17 +02:00
parent d7e8bd77e4
commit 495073425e

View File

@@ -83,9 +83,7 @@ echo "*********************************************"
# Calculate available languages # Calculate available languages
for f in "$TRANSLATION_DIR"/translation_*.json for f in "$TRANSLATION_DIR"/translation_*.json
do do
lang_json=${f#*/translation_} # Remove ".../translation_" AVAILABLE_LANGUAGES+=(`echo $f | tr "[:lower:]" "[:upper:]" | sed "s/[^_]*_//" | sed "s/\.JSON//g"`)
lang=${lang_json%.json} # Remove ".json"
AVAILABLE_LANGUAGES+=("${lang^^}") # Convert to uppercase
done done
# Checking requested language # Checking requested language