summaryrefslogtreecommitdiff
path: root/archbuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'archbuild.in')
-rw-r--r--archbuild.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/archbuild.in b/archbuild.in
index e593156..88fbbde 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -65,6 +65,11 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
subvolume_delete_recursive "${copy}"
rm -rf --one-file-system "${copy}"
+ if [ -d "${copy}" ]; then
+ find "${copy}" -xdev -type d -exec 'mountpoint' '{}' ';' | \
+ xargs -rn1 umount -l
+ rm -rf --one-file-system "${copy}"
+ fi
done
lock_close 9