2010-09-17 16:08:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-06-14 08:53:22 +00:00
|
|
|
export INSTALLDIR=$1
|
2010-09-17 16:08:12 +00:00
|
|
|
|
2013-02-16 15:00:50 +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
|
2017-06-14 08:53:22 +00:00
|
|
|
echo "usage $0 <mount_point>"
|
2010-09-17 16:08:12 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2017-06-14 08:53:22 +00:00
|
|
|
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
|
|
|
|
2014-10-14 16:02:12 +00:00
|
|
|
echo "--> Cleaning up image file..."
|
2013-02-16 15:00:50 +00:00
|
|
|
$SCRIPTSDIR/09_cleanup.sh
|
2012-01-03 21:33:20 +00:00
|
|
|
|
2012-06-06 00:54:10 +00:00
|
|
|
echo "--> Compacting image file..."
|
2017-06-14 08:53:22 +00:00
|
|
|
fstrim -v "$INSTALLDIR"
|