Created
August 28, 2010 16:59
-
-
Save eriwen/555345 to your computer and use it in GitHub Desktop.
Git repo updater
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 | |
# Git repository updater | Spencer Tipping | |
# Run this from a cron job to update all repos on a regular basis. | |
for file in *; do | |
[[ -d $file && -d $file/.git ]] || continue | |
cd $file | |
${GIT:-git} pull >& /dev/null || echo "Failed to update $file: $(${GIT:-git} pull 2>&1)" | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on Spencer Tipping's git-puller project: http://github.com/spencertipping/git-puller