From 8ceef9d46071d8e0b2974224ad590b3fe8205543 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 26 Jun 2020 22:20:38 -0700 Subject: [PATCH] qemu-check.sh: make $ROM a quoted bash array "${ROM[@]}" Removes shellcheck warning and could allow directory names with whitespace in a very distant future. Silence printf "$@" shellcheck warning in die() function. Signed-off-by: Marc Herbert --- scripts/qemu-check.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/qemu-check.sh b/scripts/qemu-check.sh index e2cfb408c..14e6730a1 100755 --- a/scripts/qemu-check.sh +++ b/scripts/qemu-check.sh @@ -15,6 +15,8 @@ rm -f dump-*.txt die() { >&2 printf '%s ERROR: ' "$0" + # We want die() to be usable exactly like printf + # shellcheck disable=SC2059 >&2 printf "$@" exit 1 } @@ -145,15 +147,14 @@ do esac if $has_rom; then - ROM="-r ${SOF_BUILDS}/build_${platform}_gcc" - ROM+="/src/arch/xtensa/rom-$platform.bin" + ROM=(-r "${SOF_BUILDS}/build_${platform}_gcc/src/arch/xtensa/rom-$platform.bin") fi xtensa_host_sh=$(find_qemu_xtensa) ${xtensa_host_sh} "$PLATFORM" -k \ "${SOF_BUILDS}"/build_"${platform}"_gcc/src/arch/xtensa/"$FWNAME" \ - $ROM \ + "${ROM[@]}" \ -o 2.0 "${SOF_BUILDS}"/dump-"$platform".txt || true # timeout # dump log into sof.git incase running in docker