xbps-src: remove dirs for bind mounts on chroot exit.

This commit is contained in:
Juan RP 2011-07-05 14:23:43 +02:00
parent 07673cf4d0
commit 6b240bbf46

View file

@ -107,11 +107,13 @@ umount_chroot_fs()
done
# Remove created dirs
if [ ! -f ${XBPS_MASTERDIR}/.xbps_mount_bind_done ]; then
if [ -d ${XBPS_MASTERDIR}/xbps ]; then
rmdir ${XBPS_MASTERDIR}/xbps 2>/dev/null
for fs in xbps cachedir; do
if [ ! -f ${XBPS_MASTERDIR}/.${fs}_mount_bind_done ]; then
if [ -d ${XBPS_MASTERDIR}/${fs} ]; then
rmdir ${XBPS_MASTERDIR}/${fs} 2>/dev/null
fi
fi
fi
done
}
if [ $# -ne 1 ]; then