mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user