Skip to content
Snippets Groups Projects
Commit 0cd9e1ae authored by Pierre Schmitz's avatar Pierre Schmitz
Browse files

archbuild: use flock -n as we do elsewhere

parent 3734c80b
No related branches found
No related tags found
No related merge requests found
......@@ -43,9 +43,12 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
[[ -d $copy ]] || continue
msg2 "Deleting chroot copy '$(basename "${copy}")'..."
# Lock the copy
exec 9>"${copy}.lock"
flock 9
exec 9>"$copydir.lock"
if ! flock -n 9; then
stat_busy "Locking chroot copy '$copy'"
flock 9
stat_done
fi
{ type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null
rm -rf "${copy}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment