From ba7bd8d43b1276949202058fdf7c5bce6eb7f468 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 13 Dec 2019 13:39:33 -0500 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