Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/check-mirrors
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2022-09-28 13:59:58 +0200
committerErich Eckner <git@eckner.net>2022-09-28 13:59:58 +0200
commitaa166d81abc3be5eb8949cc309755a22c0581c5e (patch)
tree53e376e2eeca0cc5d6a558d5be3af362c02cb7ba /bin/check-mirrors
parent981e4dbcc23a531f967de9384e1c055fb7785f40 (diff)
bin/check-mirrors: use lock file to only run once without parameters at the same time
Diffstat (limited to 'bin/check-mirrors')
-rwxr-xr-xbin/check-mirrors8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/check-mirrors b/bin/check-mirrors
index 8e782d5..d0b626c 100755
--- a/bin/check-mirrors
+++ b/bin/check-mirrors
@@ -5,6 +5,14 @@
if [ $# -eq 0 ]; then
+# Create a lock file.
+
+ exec 9> "${check_mirrors_lock_file}"
+ if ! verbose_flock 9; then
+ >&2 echo 'come back (shortly) later - I cannot lock check-mirrors.'
+ exit
+ fi
+
echo 'updating mirrors from git...' >&2
if [ -d "${releng_directory}/.git" ]; then