diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-18 10:59:16 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-18 10:59:16 +0100 |
commit | ac609d5aae4907f15dcfe21a2d49d9fefe73946f (patch) | |
tree | ae3ab85966a243784b65bab4678aa77b52c3a59f | |
parent | a3e1ed9823d4750d8e7c5610eecc811e841a35d4 (diff) |
vendor.sh: Remove _dest if it's bad
Also, provide more ample warning to the user
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | include/vendor.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/vendor.sh b/include/vendor.sh index 5d7ea82b..add5b052 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -136,8 +136,11 @@ fetch() 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' exists but has bad checksum" \ - "$_dest" + 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 + [ -L "$_dest" ] || x_ rm -f "$_dest" err "Could not safely extract '$_dest', for board '$board'" } |