diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-26 00:33:36 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-26 00:33:36 +0100 |
commit | ba7c49c090b7b41564ec5e9c69e60a022c2ace6e (patch) | |
tree | 83eaaabda1ec97e192439981ba4bc7313b645f63 | |
parent | 30bc3732c39cbb14faa8f7caf0c9206f6a401008 (diff) |
vendor.sh: simplify fetch()
the checks at the end of the function are mostly
superfluous, because bad_checksum() is immediately
called just beforehand, and performs the same checks.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | include/vendor.sh | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/vendor.sh b/include/vendor.sh index 99fc7467..0111f90f 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -132,14 +132,8 @@ fetch() ( fx_ "eval mkdst \"$binsum\"" x_ find "${_pre_dest%/*}" -type f ) || : 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 - e "$_dest" f not && err "missing file '$_dest', !extract_$dl_type"; : - e "$_dest" f && printf "WARNING: '%s' made with bad hash (will rm)\n" \ - "$_dest" 1>&2 - [ -L "$_dest" ] && printf "WARNING: '%s' is a link. Please delete!\n" \ - "$_dest" 1>&2 + [ -z "$binsum" ] && printf "'%s': checksum undefined\n" "$_dest" 1>&2 + [ -L "$_dest" ] && printf "WARNING: '%s' is a link!\n" "$_dest" 1>&2 [ -L "$_dest" ] || x_ rm -f "$_dest" err "Could not safely extract '$_dest', for board '$board'" } |