Created
November 2, 2011 15:10
-
-
Save diago/1333870 to your computer and use it in GitHub Desktop.
Updating all git repos for Redmine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
repos=( $(find /opt/repositories -type d -name .git) ) | |
for x in ${repos[@]}; do | |
cd ${x%.*} | |
git pull origin master | |
done | |
ruby /opt/redmine/script/runner "Repository.fetch_changesets" -e production > /dev/null 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Crontab every five minutes
*/5 * * * * /path_to/update_repos.sh > /dev/null 2>&1