From 8368a302a75cb6d7433b2449556e2b5ec595b0b7 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:41:54 -0400 Subject: [PATCH] Remove empty ISOs if download fails --- buildiso.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildiso.sh b/buildiso.sh index 28b7396..b21d661 100755 --- a/buildiso.sh +++ b/buildiso.sh @@ -86,7 +86,7 @@ prepare_iso() { if [[ ! -f artifacts/${srcliveisofile} ]]; then echo -n "Downloading Debian Live ISO... " - wget -O artifacts/${srcliveisofile} ${srcliveisourl} &>/dev/null || fail "Error downloading source ISO." + wget -O artifacts/${srcliveisofile} ${srcliveisourl} &>/dev/null || { rm -f artifacts/${srcliveisofile}; fail "Error downloading source ISO." } echo "done." fi