From 5b5dccd630611922f8d57a27d4f09ae7cf7cde87 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 18 May 2024 19:51:40 +0100 Subject: vendor.sh: further simplify config handling Signed-off-by: Leah Rowe --- include/option.sh | 1 + include/vendor.sh | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/option.sh b/include/option.sh index 3d9f4536..45066166 100755 --- a/include/option.sh +++ b/include/option.sh @@ -121,6 +121,7 @@ EOF check_defconfig() { + [ -d "$1" ] || $err "Target '$1' not defined." for x in "${1}"/config/*; do [ -f "${x}" ] && printf "%s\n" "$x" && return 1 done diff --git a/include/vendor.sh b/include/vendor.sh index 06b10fc7..5ab04221 100755 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -394,10 +394,7 @@ patch_rom() { rom="${1}" - check_defconfig "$boarddir" && $err "patch_rom $boarddir: no configs" - - set -- "${boarddir}/config/"* - . "${1}" 2>/dev/null + . "$(check_defconfig "${boarddir}")" 2>/dev/null || exit 0 [ "$CONFIG_HAVE_MRC" = "y" ] && \ inject "mrc.bin" "${CONFIG_MRC_FILE}" "mrc" "0xfffa0000" -- cgit v1.2.1