From 5aea59c37ef16f025f71df6a9fe617569931f163 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 2 Sep 2024 12:25:06 +0100 Subject: [PATCH] ci: Fix shellcheck warnings in firmware download Signed-off-by: Daniel Stone Fixes: 0441202d6bad ("ci: add firmware files to rootfs") Part-of: --- .gitlab-ci/container/get-firmware-from-source.sh | 5 ++++- .gitlab-ci/container/lava_build.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/container/get-firmware-from-source.sh b/.gitlab-ci/container/get-firmware-from-source.sh index 353d44907dd..0696e7c30a8 100755 --- a/.gitlab-ci/container/get-firmware-from-source.sh +++ b/.gitlab-ci/container/get-firmware-from-source.sh @@ -1,10 +1,13 @@ #!/usr/bin/env bash +# shellcheck disable=SC2046 # we want to arg-split FIRMWARE_FILES +# shellcheck disable=SC2086 # as above +# shellcheck disable=SC2116 # as above set -e ROOTFS=$1 FIRMWARE_FILES=$2 -FIRMWARE=$(jq -s '.' $FIRMWARE_FILES) +FIRMWARE=$(jq -s '.' $(echo "$FIRMWARE_FILES")) if [ -z "$FIRMWARE" ] || [ "$(echo "$FIRMWARE" | jq '. | length')" -eq 0 ]; then echo "FIRMWARE is not set or is empty." diff --git a/.gitlab-ci/container/lava_build.sh b/.gitlab-ci/container/lava_build.sh index 640931e6df2..1f2eee4a05d 100755 --- a/.gitlab-ci/container/lava_build.sh +++ b/.gitlab-ci/container/lava_build.sh @@ -2,6 +2,7 @@ # shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime. # shellcheck disable=SC2034 # Variables are used in scripts called from here # shellcheck disable=SC2086 # we want word splitting +# shellcheck disable=SC2016 # non-expanded variables are intentional # When changing this file, you need to bump the following # .gitlab-ci/image-tags.yml tags: # KERNEL_ROOTFS_TAG