vendor.sh: additional safety check

the exit from mkdst can also be non-zero if mv or cp
failed, but there's no way to handle that reliably.

therefore, the checksum verification should be done
one final time, to compensate.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-16 07:03:08 +01:00
parent d668f3a352
commit 4313b474a5
+1 -1
View File
@@ -131,7 +131,7 @@ fetch()
# the given hashsum. So, search for a matching file via bruteforce:
( fx_ "eval mkdst \"$binsum\"" x_ find "${_pre_dest%/*}" -type f ) || :
[ -f "$_dest" ] && return 0
bad_checksum "$binsum" "$_dest" || [ ! -f "$_dest" ] || return 0
[ -z "$binsum" ] && \
printf "'%s', '%s': checksum undefined. Check files in '%s'\n" \
"$board" "$_dest" "${_pre_dest%/*}" 1>&2