Remove empty ISOs if download fails

This commit is contained in:
Joshua Boniface 2019-12-13 13:39:33 -05:00
parent 53c25aca09
commit ba7bd8d43b
1 changed files with 1 additions and 1 deletions

View File

@ -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