#!/bin/sh
set -e
WAREA="`mktemp -d /tmp/bootools.XXXXXXX`"
cleanup_warea() {
sudo chflags -R noschg "${WAREA}"
sudo rm -r ${WAREA}/*
}
for t in installworld distribution installkernel distrib-dirs
do
if [ ${t} = "distrib-dirs" ]
then
cleanup_warea
fi
sudo make DESTDIR="${WAREA}" ${t}
done
sudo rm -r "${WAREA}"
echo "All looks good, have a wonderful day! :)"