f37 -> f39
[infrastructure.git] / scripts / git-slave.sh
index 470044f..178e9e9 100755 (executable)
 # Typical usage in cron
 # */3 * * * * /root/bin/git-slave.sh -q /git-slave/*.git
 
+# you might wish to tweak the repo's config, in particular the remote section
+# so as to define the proper mappings for your needs
+# e.g. from git.onelab.eu:/git-slave/rvm-rpm.git
+#[remote "origin"]
+#      url = https://github.com/cdwertmann/rvm-rpm.git
+#      fetch = refs/heads/*:refs/heads/*
+
+COMMAND=$(basename $0)
+
 function slave_repo () {
     git_slave=$1; shift
     cd $git_slave
-    git fetch -q
+    git fetch --all --tags -q || echo "$COMMAND failed in repo $git_slave"
 }
 
 for slave_dir in "$@"; do slave_repo $slave_dir; done