git://git.onelab.eu
/
infrastructure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
699da32
)
git-mirror lock
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Mon, 22 Nov 2010 09:55:44 +0000
(10:55 +0100)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Mon, 22 Nov 2010 09:55:44 +0000
(10:55 +0100)
scripts/git-mirror.sh
patch
|
blob
|
history
diff --git
a/scripts/git-mirror.sh
b/scripts/git-mirror.sh
index
949234f
..
b28a725
100755
(executable)
--- 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
+