Commit 60759481 authored by intrigeri's avatar intrigeri
Browse files

Better integrate USB image creation into the success code path (refs: #15990).

We still had part of the pre-existing code guarded by "if [ -e binary.iso ]" in
a "then" close, while the new code for the USB image support was added
elsewhere.
parent d8bc5eef
......@@ -163,23 +163,21 @@ echo "Building ISO image ${BUILD_ISO_FILENAME}..."
set -o pipefail
time lb build noauto ${@}
RET=$?
if [ -e binary.iso ]; then
echo "ISO image was successfully created"
[ "$RET" -eq 0 ] || \
echo "Warning: lb build exited with code $RET"
print_iso_size binary.iso
echo "Hybriding it..."
isohybrid $AMNESIA_ISOHYBRID_OPTS binary.iso || fatal "isohybrid failed"
print_iso_size binary.iso
truncate -s %2048 binary.iso
print_iso_size binary.iso
echo "Renaming generated files..."
mv -i binary.iso "${BUILD_ISO_FILENAME}"
mv -i binary.packages "${BUILD_PACKAGES}"
generate-build-manifest chroot/debootstrap "${BUILD_MANIFEST}"
else
fatal "lb build failed ($?)."
fi
[ -e binary.iso ] || fatal "lb build failed ($?)."
echo "ISO image was successfully created"
[ "$RET" -eq 0 ] || \
echo "Warning: lb build exited with code $RET"
print_iso_size binary.iso
echo "Hybriding it..."
isohybrid $AMNESIA_ISOHYBRID_OPTS binary.iso || fatal "isohybrid failed"
print_iso_size binary.iso
truncate -s %2048 binary.iso
print_iso_size binary.iso
echo "Renaming generated files..."
mv -i binary.iso "${BUILD_ISO_FILENAME}"
mv -i binary.packages "${BUILD_PACKAGES}"
generate-build-manifest chroot/debootstrap "${BUILD_MANIFEST}"
echo "Creating USB image ${BUILD_USB_IMAGE_FILENAME}..."
create-usb-image-from-iso "${BUILD_ISO_FILENAME}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment