Skip to content

Instantly share code, notes, and snippets.

@arthurk
Created March 20, 2010 22:32
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 arthurk/338959 to your computer and use it in GitHub Desktop.
Save arthurk/338959 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# goes through directories, checks if it's a svn/hg/git repo and updates them
for i in $(ls -d */); do
echo $i;
if [ -d "$i/.git" ]; then cd $i; git pull; cd ..; fi
if [ -d "$i/.hg" ]; then cd $i; hg pull -u; cd ..; fi
if [ -d "$i/.svn" ]; then svn up $i; fi
echo;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment