aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/files
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-02-02 19:38:56 +0000
committerMichael Scherer <misc@mageia.org>2011-02-02 19:38:56 +0000
commit41684519aa964d08810b55337514f43ed2b4c537 (patch)
treefd7c9ee430430a56307cda89c98313e71d9084b1 /modules/git/files
parent35bb51eec4c196252c6b12c9e9be34e89a7b1768 (diff)
downloadpuppet-41684519aa964d08810b55337514f43ed2b4c537.tar
puppet-41684519aa964d08810b55337514f43ed2b4c537.tar.gz
puppet-41684519aa964d08810b55337514f43ed2b4c537.tar.bz2
puppet-41684519aa964d08810b55337514f43ed2b4c537.tar.xz
puppet-41684519aa964d08810b55337514f43ed2b4c537.zip
- use a script, with a lock , so we can have more than one update
running without trouble. Remove older comments in manifests
Diffstat (limited to 'modules/git/files')
-rw-r--r--modules/git/files/update_git_svn.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/git/files/update_git_svn.sh b/modules/git/files/update_git_svn.sh
new file mode 100644
index 00000000..b3802f81
--- /dev/null
+++ b/modules/git/files/update_git_svn.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+GIT_REP="$1"
+LOCKFILE="$GIT_REP/.git/update.cron.lock"
+
+cd "$GIT_REP"
+[ -f $LOCKFILE ] && exit 0
+trap "rm -f '$LOCKFILE'" EXIT
+
+touch "$LOCKFILE"
+
+/usr/bin/git svn fetch
+/usr/bin/git svn rebase
+exit 0