summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-09-29 21:44:51 +0100
committerLeah Rowe <leah@libreboot.org>2023-09-29 21:44:51 +0100
commit9b94df5dbbfad9b2b770fbe64aca3f9f097eed32 (patch)
tree39528b270295df5664c1f88bd5e1d6fc09e12101
parent9a7bf4af0fcca345eba6d386a190a24f11946bca (diff)
blobs/download: do final check of _dest in fetch()
This way, the file is checked regardless of what type of blob is handled, not just Intel ME. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xinclude/blobutil.sh3
-rwxr-xr-xscript/update/blobs/download2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/blobutil.sh b/include/blobutil.sh
index c9101c4f..324d19eb 100755
--- a/include/blobutil.sh
+++ b/include/blobutil.sh
@@ -83,6 +83,9 @@ fetch()
rm -Rf "${dl_path}_extracted" || err "!rm ${dl_path}_extracted"
mkdirs "${_dest}" "extract_${dl_type}" || return 0
eval "extract_${dl_type}"
+
+ [ -f "${_dest}" ] && return 0
+ err "extract_${dl_type} (fetch): missing file: '${_dest}'"
}
vendor_checksum()
diff --git a/script/update/blobs/download b/script/update/blobs/download
index d2df20e2..d1a16f23 100755
--- a/script/update/blobs/download
+++ b/script/update/blobs/download
@@ -92,8 +92,6 @@ extract_intel_me()
{
bruteforce_extract_intel_me "$(pwd)/${_dest}" "$(pwd)/${appdir}" || \
err "extract_intel_me: could not extract Intel ME firmware"
- [ -f "${_dest}" ] && return 0
- err "extract_intel_me, ${board}: '${_dest}' missing"
}
# cursed, carcinogenic code. TODO rewrite it better