Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archbuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'archbuild.in')
-rw-r--r--archbuild.in9
1 files changed, 2 insertions, 7 deletions
diff --git a/archbuild.in b/archbuild.in
index bdb18c0..06c9815 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -51,19 +51,14 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
[[ -d $copy ]] || continue
msg2 "Deleting chroot copy '$(basename "${copy}")'..."
- exec 9>"$copydir.lock"
- if ! flock -n 9; then
- stat_busy "Locking chroot copy '$copy'"
- flock 9
- stat_done
- fi
+ lock_open_write 9 "$copy.lock" "Locking chroot copy '$copy'"
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>&-
+ lock_close 9
rm -rf --one-file-system "${chroots}/${repo}-${arch}"
mkdir -p "${chroots}/${repo}-${arch}"