index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-27 08:52:16 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-05-31 16:09:42 +0200 |
commit | 7cc12bd254650b15fa3c5106745f512534fc3f3d (patch) | |
tree | 2a7442940c384566c7d7dcce8044c12d271ebc5c | |
parent | 4a577c242cc01e686d575a079830b277b0f54da5 (diff) |
-rw-r--r-- | archbuild.in | 10 |
diff --git a/archbuild.in b/archbuild.in index 4194b68..73ae65d 100644 --- a/archbuild.in +++ b/archbuild.in @@ -69,6 +69,16 @@ 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 -mindepth 1 -type d \ + -exec 'mountpoint' '-q' '{}' ';' \ + -exec 'umount' '-l' '{}' ';' + rm -rf --one-file-system "${copy}" + mountpoint -q "${copy}" && \ + umount -l "${copy}" && \ + rmdir "${copy}" + fi done lock_close 9 |