From 693d3db98ecd832abf9ee91e9b14eb487ded7fc1 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Tue, 26 Oct 2021 16:10:20 -0500 Subject: repotest: fix shellcheck errors Signed-off-by: Patrick Williams Change-Id: I4f4e7957218642dc252880a0a0ea575ebde10512 --- meta-phosphor/scripts/run-repotest | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/meta-phosphor/scripts/run-repotest b/meta-phosphor/scripts/run-repotest index 7328baed0..aa2518b31 100755 --- a/meta-phosphor/scripts/run-repotest +++ b/meta-phosphor/scripts/run-repotest @@ -13,7 +13,7 @@ cd "$obmc_dir" patch_files_tmp=$(mktemp) allowed_patches_tmp=$(mktemp) -trap "rm $patch_files_tmp $allowed_patches_tmp" exit +trap 'rm $patch_files_tmp $allowed_patches_tmp' exit git ls-files -- \ '*.patch' \ @@ -22,7 +22,7 @@ git ls-files -- \ ':!:meta-raspberrypi/**' \ ':!:meta-openembedded/**' \ ':!:meta-phosphor/**' \ - | sort > $patch_files_tmp + | sort > "$patch_files_tmp" # The following patches were present on master at the time this test was @@ -64,9 +64,9 @@ meta-yadro/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Add-boot-initiato meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-support-for-persistent-only-settings.patch meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Add-support-for-boot-initiator-mailbox.patch meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-version-parsing-update-AUX-revision-info.patch -" | sort > $allowed_patches_tmp +" | sort > "$allowed_patches_tmp" -files_diff=$(comm -23 $patch_files_tmp $allowed_patches_tmp) +files_diff=$(comm -23 "$patch_files_tmp" "$allowed_patches_tmp") files_count=$(echo -n "$files_diff" | grep -c '^' || true) if [[ $files_count -ne 0 ]]; then @@ -155,7 +155,6 @@ meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest meta-phosphor/recipes-phosphor/preinit-mounts/preinit-mounts/init meta-phosphor/recipes-support/nss-pam-ldapd/files/nslcd.init -meta-phosphor/scripts/run-repotest meta-quanta/meta-common/recipes-quanta/network/usb-network/usb-network.sh meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-verify.sh @@ -190,10 +189,10 @@ non_bbfiles=$(git ls-files -- \ | grep -v -e "\.patch$" -e "\.bb$" -e "\.bbappend$") for f in $non_bbfiles; do - file_type=$(file $f) + file_type=$(file "$f") case $file_type in *shell\ script*) - if ! shellcheck -x $f; then + if ! shellcheck -x "$f"; then if [[ $lint_exempt == *$f* ]]; then echo "EXEMPT: $f" else -- cgit v1.2.3