diff --git a/helper-templates/install-chroot.sh b/helper-templates/install-chroot.sh index b14532de9d1..d6fc84f3db0 100644 --- a/helper-templates/install-chroot.sh +++ b/helper-templates/install-chroot.sh @@ -80,6 +80,7 @@ install_chroot_pkg() umount_chroot_fs() { local fs= + local dir= for fs in sys proc dev xbps xbps_builddir xbps_destdir; do [ ! -f $XBPS_MASTERDIR/.${fs}_mount_bind_done ] && continue @@ -93,4 +94,8 @@ umount_chroot_fs() fi unset fs done + + for dir in xbps xbps_builddir xbps_destdir; do + [ -d $XBPS_MASTERDIR/$dir ] && rmdir $XBPS_MASTERDIR/$dir + done }