qubes-linux-template-builder/cleanup_image
Marek Marczykowski-Górecki 9b2078d346
Add support for template with partition table on root.img
When TEMPLATE_ROOT_WITH_PARTITIONS is set, include (GPT) partition table
and install actual OS on the first one. This allows installing grub, or
other bootloader.

Fixes QubesOS/qubes-issues#2577
2017-06-24 01:28:37 +02:00

25 lines
328 B
Bash
Executable File

#!/bin/sh
export INSTALLDIR=$1
. ./builder_setup
set -e
if ! [ $# -eq 1 ]; then
echo "usage $0 <mount_point>"
exit 1
fi
if ! [ -d $INSTALLDIR ]; then
echo $INSTALLDIR does not exist
exit 1
fi
echo "--> Cleaning up image file..."
$SCRIPTSDIR/09_cleanup.sh
echo "--> Compacting image file..."
fstrim -v "$INSTALLDIR"