Skip to content

Commit

Permalink
kas-container: fix warnings from shellcheck 0.9.0
Browse files Browse the repository at this point in the history
One warning is actually a false-positive, as we need to split the
KAS_CONTAINER_COMMAND when passing to the trace function. For this, a
shellcheck override is added.

Signed-off-by: Felix Moessbauer <[email protected]>
[Jan: use single quote block to protect KAS_REPO_MOUNT_OPT]
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
fmoessbauer authored and jan-kiszka committed Mar 13, 2024
1 parent 4fe0f17 commit 7cbc345
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kas-container
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ if [ "${KAS_CMD}" = "menu" ]; then
set -- "$@" -e _KAS_REPO_DIR_HOST="$(readlink -fv "${KAS_REPO_DIR}")"
fi

BUILD_SYSTEM=$(tr '\n' '\f' 2>/dev/null < ${KAS_FIRST_FILE} | \
BUILD_SYSTEM=$(tr '\n' '\f' 2>/dev/null < "${KAS_FIRST_FILE}" | \
sed -e 's/\(.*\fconfig KAS_BUILD_SYSTEM\f\(.*\)\|.*\)/\2/' \
-e 's/\f\([[:alpha:]].*\|$\)//' \
-e 's/.*default \"\(.*\)\".*/\1/')
Expand Down Expand Up @@ -439,7 +439,7 @@ if [ "$(id -u)" -eq 0 ] && [ "${KAS_ALLOW_ROOT}" != "yes" ] ; then
"KAS_ALLOW_ROOT=yes to override."
fi

set -- "$@" -v "${KAS_REPO_DIR}":/repo:${KAS_REPO_MOUNT_OPT} \
set -- "$@" -v "${KAS_REPO_DIR}:/repo:${KAS_REPO_MOUNT_OPT}" \
-v "${KAS_WORK_DIR}":/work:rw -e KAS_WORK_DIR=/work \
-v "${KAS_BUILD_DIR}":/build:rw \
--workdir=/repo \
Expand Down Expand Up @@ -587,4 +587,5 @@ while [ $KAS_EXTRA_BITBAKE_ARGS -gt 0 ]; do
KAS_EXTRA_BITBAKE_ARGS=$((KAS_EXTRA_BITBAKE_ARGS - 1))
done

# shellcheck disable=SC2086
trace ${KAS_CONTAINER_COMMAND} run "$@"

0 comments on commit 7cbc345

Please sign in to comment.