From: thierry Date: Wed, 11 Jun 2008 06:41:37 +0000 (+0000) Subject: discard current pid X-Git-Tag: foo~309 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f3a7e1b6ee2410a0036b391bc5e2c0ef4fc61213;p=infrastructure.git discard current pid --- diff --git a/scripts/all-modules.sh b/scripts/all-modules.sh index 9a8387f..a43dd8a 100755 --- a/scripts/all-modules.sh +++ b/scripts/all-modules.sh @@ -10,7 +10,8 @@ # when the svn server has problems, this can very well last quite a while COMMAND=$(basename $0) -running=$(pgrep $COMMAND 2> /dev/null) +pid=$$ +running=$(pgrep $COMMAND 2> /dev/null | grep -v "^${pid}"'^' ) # bail out if another instance is already running [ -n "$running" ] && exit 1