Remove UPDATE
This commit is contained in:
parent
3da7d92dc8
commit
8de6493230
@ -53,20 +53,10 @@ trap cleanup ERR
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Mount qubeized_image
|
# 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"
|
export IMG="qubeized_images/$NAME-root.img"
|
||||||
|
|
||||||
[ "$UPDATE" ] && UPDATE=$(echo $UPDATE | awk '{print tolower($0)}')
|
echo "--> Copying $CLEANIMG to $IMG..."
|
||||||
if [ "$IMG" -nt "$CLEANIMG" -a "$UPDATE" == "false" ]; then
|
cp "$CLEANIMG" "$IMG" || exit 1
|
||||||
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 "--> Mounting $IMG"
|
echo "--> Mounting $IMG"
|
||||||
mkdir -p mnt
|
mkdir -p mnt
|
||||||
|
@ -15,7 +15,6 @@ if [ "$VERBOSE" -ge 2 -o "$DEBUG" == "1" ]; then
|
|||||||
else
|
else
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INSTALLDIR="$(readlink -m mnt)"
|
INSTALLDIR="$(readlink -m mnt)"
|
||||||
umount_kill "$INSTALLDIR" || :
|
umount_kill "$INSTALLDIR" || :
|
||||||
|
|
||||||
@ -29,15 +28,11 @@ customStep "$0" "pre"
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
debug "Determine if $IMG should be reused or deleted..."
|
debug "Determine if $IMG should be reused or deleted..."
|
||||||
if [ -f "$IMG" ]; then
|
if [ -f "$IMG" ]; then
|
||||||
mount -o loop "$IMG" "$INSTALLDIR" || exit 1
|
|
||||||
|
|
||||||
# Assume a failed debootstrap installation if .prepare_debootstrap does not exist
|
# 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
|
if ! [ -f "$INSTALLDIR/tmp/.prepared_debootstrap" ]; then
|
||||||
warn "Failed Image file $IMG already exists, deleting..."
|
warn "Last build failed. Deleting $IMG"
|
||||||
rm -f "$IMG"
|
rm -f "$IMG"
|
||||||
# Allow qubes to be updated
|
|
||||||
elif [ -f "$INSTALLDIR/tmp/.prepared_qubes" ]; then
|
|
||||||
rm "$INSTALLDIR/tmp/.prepared_qubes"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Umount image; don't fail if its already umounted
|
# Umount image; don't fail if its already umounted
|
||||||
|
Loading…
Reference in New Issue
Block a user