From 421f613c653525a2ff9f8aa4eb18ff7003fa59cb Mon Sep 17 00:00:00 2001 From: thierry Date: Wed, 11 Jun 2008 06:36:09 +0000 Subject: [PATCH] avoid concurrent instances --- scripts/all-modules.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/all-modules.sh b/scripts/all-modules.sh index 644c5b0..9a8387f 100755 --- a/scripts/all-modules.sh +++ b/scripts/all-modules.sh @@ -6,6 +6,14 @@ # /root/svn-build # /root/svn-build-4.2 +# avoid running several instances of this script +# when the svn server has problems, this can very well last quite a while + +COMMAND=$(basename $0) +running=$(pgrep $COMMAND 2> /dev/null) +# bail out if another instance is already running +[ -n "$running" ] && exit 1 + OUTPUT=/build/modules # usage: do_version dir name -- 2.45.2