#!/usr/bin/sudo /bin/sh set -x if [ -z "${BUILD_HOSTNAME}" ]; then . ./rpi2-settings.sh fi if [ -f ${BASEDIR}/build/chroot/proc ]; then umount ${BASEDIR}/build/chroot/proc fi if [ -f ${BASEDIR}/build/chroot/sys ]; then umount ${BASEDIR}/build/chroot/sys fi file_swap=`swapon -s | grep "${BASEDIR}" | sed "s/ .*$//"` if [ ! -n ${file_swap} ]; then swapoff ${file_swap} fi if [ -f ${BASEDIR} ]; then rm -r ${BASEDIR} fi