summaryrefslogtreecommitdiffstats
path: root/archbuild.in
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-04-06 19:50:17 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-04-06 19:50:17 +0200
commit6caad191c1e0dfab3cbb7aa3e832a45eeaea83f8 (patch)
tree560eec5bf839175248b76a4ca06ffb594972afcc /archbuild.in
parent092fe2ffde2075705b0a9c686246b3081aea963c (diff)
downloaddevtools-6caad191c1e0dfab3cbb7aa3e832a45eeaea83f8.tar.gz
devtools-6caad191c1e0dfab3cbb7aa3e832a45eeaea83f8.tar.xz
Only try to use btrfs snapshots if chroots are on a btrfs partition
Diffstat (limited to 'archbuild.in')
-rw-r--r--archbuild.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/archbuild.in b/archbuild.in
index 9f9633c..bdb18c0 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -58,7 +58,9 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
stat_done
fi
- { type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null
+ if [[ "$(stat -f -c %T "${copy}")" == btrfs ]]; then
+ { type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null
+ fi
rm -rf --one-file-system "${copy}"
done
exec 9>&-