summaryrefslogtreecommitdiff
path: root/resources/scripts/update/blobs/download
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-08-17 00:43:34 +0100
committerLeah Rowe <leah@libreboot.org>2023-08-17 00:43:34 +0100
commit8459e33bbcbe70cc08f449c3d46f1310c65680a1 (patch)
treef29f4c3aa4247fa2ec18d949b685083c51ba3019 /resources/scripts/update/blobs/download
parent59dba6cfcdc6c154e4d46c14c42e7b6f0b84c7b5 (diff)
improve user feedback in blobutil
make it output messages that tell the user important information. it's only subtle but it makes a difference to some people, who need confirmation. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/scripts/update/blobs/download')
-rwxr-xr-xresources/scripts/update/blobs/download17
1 files changed, 8 insertions, 9 deletions
diff --git a/resources/scripts/update/blobs/download b/resources/scripts/update/blobs/download
index 343e2a81..b4b74c1b 100755
--- a/resources/scripts/update/blobs/download
+++ b/resources/scripts/update/blobs/download
@@ -53,19 +53,18 @@ main()
board="${1}"
boarddir="${cbcfgsdir}/${board}"
- exit_if_no_config="exit 0"
+ [ ! -d "${boarddir}" ] && \
+ fail "Board target, ${board}, not defined"
+ [ ! -f "${boarddir}/target.cfg" ] && \
+ fail "Target missing target.cfg"
+
+ no_config="printf \"No config for target, %s\\n\" ${board} 1>&2; exit 0"
for x in "${boarddir}"/config/*; do
if [ -f "${x}" ]; then
- exit_if_no_config=""
+ no_config=""
fi
done
- eval "${exit_if_no_config}"
-
- if [ ! -d "${boarddir}" ]; then
- fail "Target not defined"
- elif [ ! -f "${boarddir}/target.cfg" ]; then
- fail "Target missing target.cfg"
- fi
+ eval "${no_config}"
detect_firmware || exit 0
scan_sources_config