summaryrefslogtreecommitdiff
path: root/script/update/blobs
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-09-04 16:16:53 +0100
committerLeah Rowe <leah@libreboot.org>2023-09-04 16:16:53 +0100
commit2cbc7eea9533c6da7a4b1cbc3408066aaef85f5a (patch)
tree8c46c2fb7fc253fe991f498c0068d73fe693bee5 /script/update/blobs
parent52677309c529c6cbaad5cc76b39f2b9598488ed7 (diff)
update/blobs/*: unify checking of defconfig files
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update/blobs')
-rwxr-xr-xscript/update/blobs/download8
-rwxr-xr-xscript/update/blobs/extract7
-rwxr-xr-xscript/update/blobs/inject8
3 files changed, 6 insertions, 17 deletions
diff --git a/script/update/blobs/download b/script/update/blobs/download
index 4c2ed846..1a7e2908 100755
--- a/script/update/blobs/download
+++ b/script/update/blobs/download
@@ -6,6 +6,7 @@
# SPDX-License-Identifier: GPL-3.0-only
. "include/err.sh"
+. "include/defconfig.sh"
agent="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
@@ -56,12 +57,7 @@ main()
board="${1}"
boarddir="${cbcfgsdir}/${board}"
- no_config="printf \"No config for target, %s\\n\" ${board} 1>&2; exit 0"
- for x in "${boarddir}"/config/*; do
- [ -f "${x}" ] && no_config=""
- done
- eval "${no_config}"
-
+ check_defconfig "${boarddir}" || exit 0
detect_firmware || exit 0
scan_sources_config
diff --git a/script/update/blobs/extract b/script/update/blobs/extract
index 7b7ee2d5..1ea7070b 100755
--- a/script/update/blobs/extract
+++ b/script/update/blobs/extract
@@ -6,6 +6,7 @@
# SPDX-License-Identifier: GPL-3.0-only
. "include/err.sh"
+. "include/defconfig.sh"
sname=""
board=""
@@ -61,11 +62,7 @@ extract_blobs()
{
printf "extracting blobs for %s from %s\n" ${board} ${vendor_rom}
- no_config="printf \"No configs on target, %s\\n\" ${board} 1>&2; exit 1"
- for x in "${boarddir}"/config/*; do
- [ -f "${x}" ] && no_config=""
- done
- eval "${no_config}"
+ check_defconfig "${boarddir}" || exit 1
set -- "${boarddir}/config/"*
. "${1}" 2>/dev/null
diff --git a/script/update/blobs/inject b/script/update/blobs/inject
index 8eec544a..9d3d4678 100755
--- a/script/update/blobs/inject
+++ b/script/update/blobs/inject
@@ -6,6 +6,7 @@
# SPDX-License-Identifier: GPL-3.0-only
. "include/err.sh"
+. "include/defconfig.sh"
sname=""
archive=""
@@ -179,12 +180,7 @@ patch_rom()
{
rom="${1}"
- no_config="printf \"No configs on target, %s\\n\" ${board} 1>&2; exit 1"
- for x in "${boarddir}"/config/*; do
- [ -f "${x}" ] && no_config=""
- done
- eval "${no_config}"
-
+ check_defconfig "${boarddir}" || exit 1
set -- "${boarddir}/config/"*
. "${1}" 2>/dev/null