diff --git a/qubeize_image b/qubeize_image index 703392f..0333754 100755 --- a/qubeize_image +++ b/qubeize_image @@ -53,20 +53,10 @@ trap cleanup ERR # ------------------------------------------------------------------------------ # Mount qubeized_image # ------------------------------------------------------------------------------ -# NEW: continue installation from last point if UPDATE="false" -# if UPDATE does not exist (keep it backwards compatible for fedora script) -# - OR - -# update="true", copy over prepared image as normal - export IMG="qubeized_images/$NAME-root.img" -[ "$UPDATE" ] && UPDATE=$(echo $UPDATE | awk '{print tolower($0)}') -if [ "$IMG" -nt "$CLEANIMG" -a "$UPDATE" == "false" ]; then - echo "--> Using original $IMG... (UPDATE=false and qubized_image is newer than prepared_image)" -else - echo "--> Copying $CLEANIMG to $IMG..." - cp "$CLEANIMG" "$IMG" || exit 1 -fi +echo "--> Copying $CLEANIMG to $IMG..." +cp "$CLEANIMG" "$IMG" || exit 1 echo "--> Mounting $IMG" mkdir -p mnt diff --git a/scripts_debian/00_prepare.sh b/scripts_debian/00_prepare.sh index 03edeb5..e4eaad1 100755 --- a/scripts_debian/00_prepare.sh +++ b/scripts_debian/00_prepare.sh @@ -15,7 +15,6 @@ if [ "$VERBOSE" -ge 2 -o "$DEBUG" == "1" ]; then else set -e fi - INSTALLDIR="$(readlink -m mnt)" umount_kill "$INSTALLDIR" || : @@ -29,15 +28,11 @@ customStep "$0" "pre" # ------------------------------------------------------------------------------ debug "Determine if $IMG should be reused or deleted..." if [ -f "$IMG" ]; then - mount -o loop "$IMG" "$INSTALLDIR" || exit 1 - # Assume a failed debootstrap installation if .prepare_debootstrap does not exist + mount -o loop "$IMG" "$INSTALLDIR" || exit 1 if ! [ -f "$INSTALLDIR/tmp/.prepared_debootstrap" ]; then - warn "Failed Image file $IMG already exists, deleting..." + warn "Last build failed. Deleting $IMG" rm -f "$IMG" - # Allow qubes to be updated - elif [ -f "$INSTALLDIR/tmp/.prepared_qubes" ]; then - rm "$INSTALLDIR/tmp/.prepared_qubes" fi # Umount image; don't fail if its already umounted