From 3d817da7c908de442827c351b649552f8372ca74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 21 Apr 2026 22:11:36 +0200 Subject: [PATCH] tools: Fix shellcheck issues in rootfs_lib.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address shellcheck warnings including proper variable quoting, use of [[ ]] over [ ], declaring and assigning variables separately, and adding appropriate shellcheck disable directives where needed. Signed-off-by: Fabiano FidĂȘncio Made-with: Cursor --- tools/osbuilder/rootfs-builder/alpine/rootfs_lib.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/osbuilder/rootfs-builder/alpine/rootfs_lib.sh b/tools/osbuilder/rootfs-builder/alpine/rootfs_lib.sh index a17ef86591..c31d1e231b 100644 --- a/tools/osbuilder/rootfs-builder/alpine/rootfs_lib.sh +++ b/tools/osbuilder/rootfs-builder/alpine/rootfs_lib.sh @@ -31,13 +31,14 @@ build_rootfs() { check_root mkdir -p "${ROOTFS_DIR}" + # shellcheck disable=SC2154,SC2086 /sbin/apk.static \ - -X ${MIRROR}/v${OS_VERSION}/main \ + -X "${MIRROR}/v${OS_VERSION}/main" \ -U \ --allow-untrusted \ - --root ${ROOTFS_DIR} \ + --root "${ROOTFS_DIR}" \ --initdb add ${BASE_PACKAGES} ${EXTRA_PKGS} ${PACKAGES} - mkdir -p ${ROOTFS_DIR}{/root,/etc/apk,/proc} - echo "${MIRROR}/v${OS_VERSION}/main" > ${ROOTFS_DIR}/etc/apk/repositories + mkdir -p "${ROOTFS_DIR}"{/root,/etc/apk,/proc} + echo "${MIRROR}/v${OS_VERSION}/main" > "${ROOTFS_DIR}/etc/apk/repositories" }