summaryrefslogtreecommitdiffstats
path: root/archbuild
diff options
context:
space:
mode:
authorJan Steffens <jan.steffens@gmail.com>2011-03-13 15:19:20 +0100
committerJan Steffens <jan.steffens@gmail.com>2011-03-22 19:47:48 +0100
commit0af05a48abb1d35380f4f4259deb163eb3b7b174 (patch)
tree6ded82b231c23421b76147e870f96d07b1385568 /archbuild
parent174ff59dba8c24f544e354cd43f3b68aea91d265 (diff)
downloaddevtools-0af05a48abb1d35380f4f4259deb163eb3b7b174.tar.gz
devtools-0af05a48abb1d35380f4f4259deb163eb3b7b174.tar.xz
Use Btrfs snapshots for chroot copies, when available
This is much faster than using Rsync to clone. Rsync stays available when the chroots are not on a Btrfs.
Diffstat (limited to 'archbuild')
-rwxr-xr-xarchbuild1
1 files changed, 1 insertions, 0 deletions
diff --git a/archbuild b/archbuild
index 9dd4888..19b734b 100755
--- a/archbuild
+++ b/archbuild
@@ -45,6 +45,7 @@ if ${clean_first} || [ ! -d "${chroots}/${repo}-${arch}" ]; then
exec 9>${copy}.lock
flock 9
+ { type -P btrfs && btrfs subvolume delete ${copy}; } &>/dev/null
rm -rf ${copy}
done
exec 9>&-