From 6519cea9cff998d3484cbbbb3fbbedb886b93dfd Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 29 Sep 2023 22:34:34 +0100 Subject: include/blobutil: simplify check_defconfig() Signed-off-by: Leah Rowe --- include/blobutil.sh | 5 ++--- script/update/blobs/inject | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/blobutil.sh b/include/blobutil.sh index 324d19eb..a32a8ba6 100755 --- a/include/blobutil.sh +++ b/include/blobutil.sh @@ -47,11 +47,10 @@ eval "${setvars}" check_defconfig() { - no_config="printf \"No target defconfig in %s\\n\" ${1} 1>&2; return 1" for x in "${1}"/config/*; do - [ -f "${x}" ] && no_config="" + [ -f "${x}" ] && return 0 done - eval "${no_config}" + return 1 } fetch() diff --git a/script/update/blobs/inject b/script/update/blobs/inject index 51198c27..01d4cfd6 100755 --- a/script/update/blobs/inject +++ b/script/update/blobs/inject @@ -171,7 +171,8 @@ patch_rom() [ -f "${rom%_nomicrocode.rom}.rom" ] && \ [ "${release_archive}" = "y" ] && return 0 - check_defconfig "${boarddir}" || exit 1 + check_defconfig "${boarddir}" || err "patch_rom ${rom}: no defconfig" + set -- "${boarddir}/config/"* . "${1}" 2>/dev/null -- cgit v1.2.1