Skip to content

Instantly share code, notes, and snippets.

@diago
Created November 2, 2011 15:10
Show Gist options
  • Save diago/1333870 to your computer and use it in GitHub Desktop.
Save diago/1333870 to your computer and use it in GitHub Desktop.
Updating all git repos for Redmine
#!/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 &
@diago
Copy link
Author

diago commented Nov 2, 2011

Crontab every five minutes

*/5 * * * * /path_to/update_repos.sh > /dev/null 2>&1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment