From: Thierry Parmentelat Date: Mon, 22 Nov 2010 12:15:37 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.onelab.eu/git/infrastructure X-Git-Tag: foo~57 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0ea13f501c4219bc7e352d140f195bdefaea7460;hp=6ce4d2c9915d7292c0e636cbb6c179ebd0b4d075;p=infrastructure.git Merge branch 'master' of ssh://git.onelab.eu/git/infrastructure --- diff --git a/scripts/git-mirror.sh b/scripts/git-mirror.sh index 949234f..b28a725 100755 --- a/scripts/git-mirror.sh +++ b/scripts/git-mirror.sh @@ -8,6 +8,7 @@ QUIET=0 FAILED=0 FAILED_CMDS="" NOTIFIED_FILE="NOTIFIED_ADMINS" +RUNNING_FILE=$LOCAL_MIRROR_DIR/RUNNING_MIRROR function msg () { if [ $QUIET -eq 0 ] @@ -166,6 +167,18 @@ do esac done -shift $((OPTIND-1)) -mirror $@ + +if [ -f $RUNNING_FILE ] +then + if [ $QUIET -eq 0 ] + then + echo "Another git-mirror is running. Aborting... " $RUNNING_FILE + fi +else + shift $((OPTIND-1)) + touch $RUNNING_FILE + mirror $@ + rm -f $RUNNING_FILE +fi +