[Buildroot] [git commit] board/zynq: fix shellcheck issues

Peter Korsgaard peter at korsgaard.com
Tue Jun 6 19:26:34 UTC 2023


commit: https://git.buildroot.net/buildroot/commit/?id=7db2ab3041150ee382a257c6c7ce686f9ba24ce9
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

This patch cleans up board/zynq shellcheck issues.

Signed-off-by: Neal Frager <neal.frager at amd.com>
[Peter: use ${} for variables, quotes around entire word]
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 .checkpackageignore      | 2 --
 board/zynq/post-build.sh | 4 ++--
 board/zynq/post-image.sh | 8 ++++----
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/.checkpackageignore b/.checkpackageignore
index 10e70f0787..90a1481e54 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -101,8 +101,6 @@ board/udoo/common/post-build.sh Shellcheck
 board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch Upstream
 board/versal/post-build.sh Shellcheck
 board/versal/post-image.sh Shellcheck TrailingSpace
-board/zynq/post-build.sh Shellcheck
-board/zynq/post-image.sh Shellcheck
 board/zynqmp/kria/kv260/kv260.sh Shellcheck
 board/zynqmp/kria/patches/uboot/v1-0001-makefile-add-multi_dtb_fit-dep.patch ApplyOrder Upstream
 board/zynqmp/post-build.sh Shellcheck
diff --git a/board/zynq/post-build.sh b/board/zynq/post-build.sh
index 9fd8bbf2c8..810fe99879 100755
--- a/board/zynq/post-build.sh
+++ b/board/zynq/post-build.sh
@@ -3,6 +3,6 @@
 # genimage will need to find the extlinux.conf
 # in the binaries directory
 
-BOARD_DIR="$(dirname $0)"
+BOARD_DIR="$(dirname "$0")"
 
-install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux.conf
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${BINARIES_DIR}/extlinux.conf"
diff --git a/board/zynq/post-image.sh b/board/zynq/post-image.sh
index ac74286cf6..627c8ac41a 100755
--- a/board/zynq/post-image.sh
+++ b/board/zynq/post-image.sh
@@ -6,10 +6,10 @@
 
 FIRST_DT=$(sed -n \
            's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9\-]*\).*"$/\1/p' \
-           ${BR2_CONFIG})
+           "${BR2_CONFIG}")
 
-[ -z "${FIRST_DT}" ] || ln -fs ${FIRST_DT}.dtb ${BINARIES_DIR}/system.dtb
+[ -z "${FIRST_DT}" ] || ln -fs "${FIRST_DT}.dtb" "${BINARIES_DIR}/system.dtb"
 
-BOARD_DIR="$(dirname $0)"
+BOARD_DIR="$(dirname "$0")"
 
-support/scripts/genimage.sh -c $BOARD_DIR/genimage.cfg
+support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"



More information about the buildroot mailing list