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]: b32d7c99c6
Signed-off-by: James Knight <james.d.knight@live.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
[yann.morin.1998@free.fr: also reinstate plural to the variable name]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
parent
9e90591b22
commit
a940148989
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
QEMU_BOARD_DIR="$(dirname "$0")"
|
QEMU_BOARD_DIR="$(dirname "$0")"
|
||||||
DEFCONFIG_NAME="$(basename "$2")"
|
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"
|
START_QEMU_SCRIPT="${BINARIES_DIR}/start-qemu.sh"
|
||||||
|
|
||||||
if [[ "${DEFCONFIG_NAME}" =~ ^"qemu_*" ]]; then
|
if [[ "${DEFCONFIG_NAME}" =~ ^"qemu_*" ]]; then
|
||||||
@ -12,7 +12,8 @@ fi
|
|||||||
|
|
||||||
# Search for "# qemu_*_defconfig" tag in all readme.txt files.
|
# Search for "# qemu_*_defconfig" tag in all readme.txt files.
|
||||||
# Qemu command line on multilines using back slash are accepted.
|
# 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
|
if [ -z "${QEMU_CMD_LINE}" ]; then
|
||||||
# No Qemu cmd line found, can't test.
|
# No Qemu cmd line found, can't test.
|
||||||
|
Loading…
Reference in New Issue
Block a user