From a94014898909f4538b106d21a5399ef7cc3608eb Mon Sep 17 00:00:00 2001 From: James Knight Date: Fri, 14 Apr 2023 17:53:54 -0400 Subject: [PATCH] board/qemu: restore readme globbing The QEMU board's post-image script will glob through various `readme.txt` files for an appropriate command line to use. Recent linter changes [1] prevents this from happening, and results in the following build error: >>> Executing post-image script board/qemu/post-image.sh sed: can't read board/qemu/*/readme.txt: No such file or directory Reverting part of the shellcheck fixes for the README file arguments and marking a linter exception. [1]: b32d7c99c64d6dcb7a68036a7abfa86b8b558627 Signed-off-by: James Knight Cc: Yann E. MORIN [yann.morin.1998@free.fr: also reinstate plural to the variable name] Signed-off-by: Yann E. MORIN --- board/qemu/post-image.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/board/qemu/post-image.sh b/board/qemu/post-image.sh index 763287ca39..fe46d0d4af 100755 --- a/board/qemu/post-image.sh +++ b/board/qemu/post-image.sh @@ -2,7 +2,7 @@ QEMU_BOARD_DIR="$(dirname "$0")" DEFCONFIG_NAME="$(basename "$2")" -README_FILE="${QEMU_BOARD_DIR}/*/readme.txt" +README_FILES="${QEMU_BOARD_DIR}/*/readme.txt" START_QEMU_SCRIPT="${BINARIES_DIR}/start-qemu.sh" if [[ "${DEFCONFIG_NAME}" =~ ^"qemu_*" ]]; then @@ -12,7 +12,8 @@ fi # Search for "# qemu_*_defconfig" tag in all readme.txt files. # Qemu command line on multilines using back slash are accepted. -QEMU_CMD_LINE="$(sed -r ':a; /\\$/N; s/\\\n//; s/\t/ /; ta; /# '"${DEFCONFIG_NAME}"'$/!d; s/#.*//' \ "${README_FILE}")" +# shellcheck disable=SC2086 # glob over each readme file +QEMU_CMD_LINE="$(sed -r ':a; /\\$/N; s/\\\n//; s/\t/ /; ta; /# '"${DEFCONFIG_NAME}"'$/!d; s/#.*//' ${README_FILES})" if [ -z "${QEMU_CMD_LINE}" ]; then # No Qemu cmd line found, can't test.