1
0
forked from me/IronOS

Update build.sh to pass shellcheck checks (#1789)

source/build.sh: update according to shellcheck recommendations
This commit is contained in:
Ivan Zorin
2023-08-09 01:47:25 +03:00
committed by GitHub
parent c0f1c35ba5
commit d5035bb956

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
TRANSLATION_DIR="../Translations" TRANSLATION_DIR="../Translations"
#TRANSLATION_SCRIPT="make_translation.py" #TRANSLATION_SCRIPT="make_translation.py"
@@ -91,14 +91,10 @@ while getopts "h:l:m:" option; do
usage usage
;; ;;
l) l)
set -f IFS=' ' read -r -a largs <<< "${OPTARG}"
IFS=' '
largs=($OPTARG)
;; ;;
m) m)
set -f IFS=' ' read -r -a margs <<< "${OPTARG}"
IFS=' '
margs=($OPTARG)
;; ;;
*) *)
usage usage
@@ -124,7 +120,7 @@ if ((${#largs[@]})); then
done done
echo "" echo ""
fi fi
if [ -z "$BUILD_LANGUAGES" ]; then if [ -z "${BUILD_LANGUAGES[*]}" ]; then
echo " No custom languages selected." echo " No custom languages selected."
echo " Building: [ALL LANGUAGES]" echo " Building: [ALL LANGUAGES]"
BUILD_LANGUAGES+=("${AVAILABLE_LANGUAGES[@]}") BUILD_LANGUAGES+=("${AVAILABLE_LANGUAGES[@]}")
@@ -152,7 +148,7 @@ if ((${#margs[@]})); then
echo "" echo ""
fi fi
if [ -z "$BUILD_MODELS" ]; then if [ -z "${BUILD_MODELS[*]}" ]; then
echo " No custom models selected." echo " No custom models selected."
echo " Building: [ALL MODELS]" echo " Building: [ALL MODELS]"
BUILD_MODELS+=("${AVAILABLE_MODELS[@]}") BUILD_MODELS+=("${AVAILABLE_MODELS[@]}")