From 412aa161dfc42600a80de0f0fa8eb185ba2afc3d Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:41:53 -0400 Subject: [PATCH] Forcibly replace squashfs if it exists --- buildiso.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildiso.sh b/buildiso.sh index ca5a151..7c95bae 100755 --- a/buildiso.sh +++ b/buildiso.sh @@ -121,6 +121,9 @@ prepare_rootfs() { echo -n "Generating squashfs image of live installation... " if [[ ! -f artifacts/filesystem.squashfs || -z ${usecachedsquashfs} ]]; then + if [[ -f artifacts/filesystem.squashfs ]]; then + rm -f artifacts/filesystem.squashfs &>/dev/null + fi sudo nice mksquashfs ${tempdir}/rootfs/ artifacts/filesystem.squashfs -e boot &>/dev/null || fail "Error generating squashfs." fi sudo cp artifacts/filesystem.squashfs ${tempdir}/installer/live/filesystem.squashfs &>/dev/null || fail "Error copying squashfs to tempdir."