Skip to content

Instantly share code, notes, and snippets.

@bretthoerner
Created August 27, 2009 18:32
Show Gist options
  • Save bretthoerner/176466 to your computer and use it in GitHub Desktop.
Save bretthoerner/176466 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "### git ###"
for dir in `gfind . -maxdepth 2 -name '.git' -type d`; do
cd $dir
cd ..
grep -q svn-remote .git/config
if [ "$?" -ne "0" ]; then
git fetch
else
git svn fetch
fi
cd ..
done
echo "### hg ###"
for dir in `gfind . -maxdepth 2 -name '.hg' -type d`; do
cd $dir
cd ..
hg pull
cd ..
done
echo "### bzr ###"
for dir in `gfind . -maxdepth 2 -name '.bzr' -type d`; do
cd $dir
cd ..
bzr pull
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment