From aa166d81abc3be5eb8949cc309755a22c0581c5e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 28 Sep 2022 13:59:58 +0200 Subject: bin/check-mirrors: use lock file to only run once without parameters at the same time --- bin/check-mirrors | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bin/check-mirrors') 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 -- cgit v1.2.3-54-g00ecf