From 9b94df5dbbfad9b2b770fbe64aca3f9f097eed32 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 29 Sep 2023 21:44:51 +0100 Subject: 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 --- include/blobutil.sh | 3 +++ script/update/blobs/download | 2 -- 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 -- cgit v1.2.1