mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-04-26 18:43:06 +00:00
tools: Fix shellcheck issues in rootfs_lib.sh
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 <ffidencio@nvidia.com> Made-with: Cursor
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user