qubes-linux-template-builder/cleanup_image

25 lines
328 B
Plaintext
Raw Normal View History

2010-09-17 16:08:12 +00:00
#!/bin/sh
export INSTALLDIR=$1
2010-09-17 16:08:12 +00:00
. ./builder_setup
2012-01-03 21:33:20 +00:00
set -e
2010-09-17 16:08:12 +00:00
if ! [ $# -eq 1 ]; then
echo "usage $0 <mount_point>"
2010-09-17 16:08:12 +00:00
exit 1
fi
if ! [ -d $INSTALLDIR ]; then
echo $INSTALLDIR does not exist
2010-09-17 16:08:12 +00:00
exit 1
fi
2012-01-03 21:33:20 +00:00
echo "--> Cleaning up image file..."
$SCRIPTSDIR/09_cleanup.sh
2012-01-03 21:33:20 +00:00
2012-06-06 00:54:10 +00:00
echo "--> Compacting image file..."
fstrim -v "$INSTALLDIR"