Skip to content

Instantly share code, notes, and snippets.

@eriwen
Created August 28, 2010 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eriwen/555345 to your computer and use it in GitHub Desktop.
Save eriwen/555345 to your computer and use it in GitHub Desktop.
Git repo updater
#!/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
@eriwen
Copy link
Author

eriwen commented Aug 28, 2010

Based on Spencer Tipping's git-puller project: http://github.com/spencertipping/git-puller

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