Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/mkarchroot
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 /mkarchroot
parent174ff59dba8c24f544e354cd43f3b68aea91d265 (diff)
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 'mkarchroot')
-rwxr-xr-xmkarchroot4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkarchroot b/mkarchroot
index 5c6548e..f385731 100755
--- a/mkarchroot
+++ b/mkarchroot
@@ -181,6 +181,10 @@ else
exit 1
fi
+ if { type -P btrfs && btrfs subvolume create "${working_dir}"; } &>/dev/null; then
+ chmod 0755 "${working_dir}"
+ fi
+
mkdir -p "${working_dir}/var/lib/pacman/sync"
mkdir -p "${working_dir}/etc/"