kas-docker: fix shellcheck warnings
Signed-off-by: Claudius Heine <ch@denx.de> [Jan: tiny indention fix] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
a48ae6a7fa
commit
f2c68e6862
@ -115,7 +115,7 @@ while [ $# -gt 0 ]; do
|
|||||||
;;
|
;;
|
||||||
--with-loop-dev)
|
--with-loop-dev)
|
||||||
if ! LOOP_DEV=$(/sbin/losetup -f 2>/dev/null); then
|
if ! LOOP_DEV=$(/sbin/losetup -f 2>/dev/null); then
|
||||||
if [ $(id -u) -eq 0 ]; then
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
echo "Error: loop device not available!"
|
echo "Error: loop device not available!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -198,6 +198,9 @@ while [ $# -gt 0 ]; do
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
|
# Ignore 'Assigning array to string' warning.
|
||||||
|
# This needs to be fixed properly.
|
||||||
|
# shellcheck disable=SC2124
|
||||||
KAS_EXTRA_BITBAKE_ARGS="$@"
|
KAS_EXTRA_BITBAKE_ARGS="$@"
|
||||||
shift $#
|
shift $#
|
||||||
;;
|
;;
|
||||||
@ -236,7 +239,7 @@ KAS_FILES=/repo/"$(echo "${KAS_FILES}" | sed 's|'"${REPO_DIR}"'/||g;s|:|:/repo/|
|
|||||||
|
|
||||||
trace mkdir -p "${KAS_WORK_DIR}"
|
trace mkdir -p "${KAS_WORK_DIR}"
|
||||||
|
|
||||||
if [ $(id -u) -eq 0 ] && [ "${KAS_ALLOW_ROOT}" != "yes" ] ; then
|
if [ "$(id -u)" -eq 0 ] && [ "${KAS_ALLOW_ROOT}" != "yes" ] ; then
|
||||||
echo "Error: Running as root - may break certain recipes."
|
echo "Error: Running as root - may break certain recipes."
|
||||||
echo "Better give a regular user docker access. Set" \
|
echo "Better give a regular user docker access. Set" \
|
||||||
"KAS_ALLOW_ROOT=yes to override."
|
"KAS_ALLOW_ROOT=yes to override."
|
||||||
@ -245,7 +248,7 @@ fi
|
|||||||
|
|
||||||
set -- -v "${REPO_DIR}":/repo:ro \
|
set -- -v "${REPO_DIR}":/repo:ro \
|
||||||
-v "${KAS_WORK_DIR}":/work:rw --workdir=/work \
|
-v "${KAS_WORK_DIR}":/work:rw --workdir=/work \
|
||||||
-e USER_ID=$(id -u) -e GROUP_ID=$(id -g) --rm
|
-e USER_ID="$(id -u)" -e GROUP_ID="$(id -g)" --rm
|
||||||
|
|
||||||
if [ -n "${SSH_DIR}" ] ; then
|
if [ -n "${SSH_DIR}" ] ; then
|
||||||
if [ ! -d "${SSH_DIR}" ]; then
|
if [ ! -d "${SSH_DIR}" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user