From ac609d5aae4907f15dcfe21a2d49d9fefe73946f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 18 May 2025 10:59:16 +0100 Subject: vendor.sh: Remove _dest if it's bad Also, provide more ample warning to the user Signed-off-by: Leah Rowe --- include/vendor.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') 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'" } -- cgit v1.2.1