# 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/*
function slave_repo () {
git_slave=$1; shift
cd $git_slave
- git fetch -q
+ git fetch --all --tags -q
}
for slave_dir in "$@"; do slave_repo $slave_dir; done