Conveniently print all fails at once

This commit is contained in:
Joshua Boniface 2020-08-16 12:15:39 -04:00 committed by Joshua Boniface
parent c760dc1c32
commit 4952e6020e
1 changed files with 8 additions and 4 deletions

View File

@ -12,10 +12,14 @@ fail() {
exit 1
}
which debootstrap &>/dev/null || fail "This script requires debootstrap."
which mksquashfs &>/dev/null || fail "This script requires squashfs-tools."
which xorriso &>/dev/null || fail "This script requires xorriso."
test -f /usr/lib/ISOLINUX/isohdpfx.bin &>/dev/null || fail "This script requires isolinux."
fail=""
which debootstrap &>/dev/null || fail="y"
which mksquashfs &>/dev/null || fail="y"
which xorriso &>/dev/null || fail="y"
test -f /usr/lib/ISOLINUX/isohdpfx.bin &>/dev/null || fail="y"
if [[ -n ${fail} ]]; then
fail "This script requires debootstrap, xorriso, squashfs-tools, and isolinux"
fi
isofilename="pvc-installer_$(date +%Y-%m-%d).iso"
srcliveisopath="https://cdimage.debian.org/mirror/cdimage/release/current-live/amd64/iso-hybrid"