summaryrefslogtreecommitdiff
path: root/script/update/blobs
diff options
context:
space:
mode:
Diffstat (limited to 'script/update/blobs')
-rwxr-xr-xscript/update/blobs/extract20
1 files changed, 7 insertions, 13 deletions
diff --git a/script/update/blobs/extract b/script/update/blobs/extract
index f44086a9..7b7ee2d5 100755
--- a/script/update/blobs/extract
+++ b/script/update/blobs/extract
@@ -37,22 +37,12 @@ main()
vendor_rom="${2}"
boarddir="${cbcfgsdir}/${board}"
- check_board
+ [ -f "${vendor_rom}" ] || \
+ err "${board}: file does not exist: ${vendor_rom}"
build_dependencies
extract_blobs
}
-check_board()
-{
- if [ ! -f "${vendor_rom}" ]; then
- err "check_board: ${board}: file does not exist: ${vendor_rom}"
- elif [ ! -d "${boarddir}" ]; then
- err "check_board: ${board}: target not defined"
- elif [ ! -f "${boarddir}/target.cfg" ]; then
- err "check_board: ${board}: missing target.cfg"
- fi
-}
-
build_dependencies()
{
if [ ! -d me_cleaner ]; then
@@ -71,9 +61,13 @@ 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}"
set -- "${boarddir}/config/"*
. "${1}" 2>/dev/null
- . "${boarddir}/target.cfg"
[ "$CONFIG_HAVE_MRC" != "y" ] || \
./update blobs mrc || err "extract_blobs: can't fetch mrc"