From 5aa30f2b054a77782e35ad3a873f4ca8914faa90 Mon Sep 17 00:00:00 2001 From: slycordinator <68940237+slycordinator@users.noreply.github.com> Date: Mon, 27 Dec 2021 16:07:55 +0900 Subject: [PATCH] update build.sh Modified quoting/variables as recommended by shellcheck --- source/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/build.sh b/source/build.sh index 8d3700fe..643af510 100755 --- a/source/build.sh +++ b/source/build.sh @@ -77,7 +77,7 @@ echo "*********************************************" # Calculate available languages for f in "$TRANSLATION_DIR"/translation_*.json; do - AVAILABLE_LANGUAGES+=($(echo $f | tr "[:lower:]" "[:upper:]" | sed "s/[^_]*_//" | sed "s/\.JSON//g")) + AVAILABLE_LANGUAGES+=("$(echo "$f" | tr "[:lower:]" "[:upper:]" | sed "s/[^_]*_//" | sed "s/\.JSON//g")") done # Checking requested language @@ -124,8 +124,8 @@ if [ ${#BUILD_LANGUAGES[@]} -gt 0 ] && [ ${#BUILD_MODELS[@]} -gt 0 ]; then checkLastCommand for model in "${BUILD_MODELS[@]}"; do - echo "Building firmware for $model in ${BUILD_LANGUAGES[@]}" - make -j$(nproc) model="$model" "${BUILD_LANGUAGES[@]/#/firmware-}" >/dev/null + echo "Building firmware for $model in ${BUILD_LANGUAGES[*]}" + make -j"$(nproc)" model="$model" "${BUILD_LANGUAGES[@]/#/firmware-}" >/dev/null checkLastCommand done else