Created
November 3, 2009 15:21
-
-
Save jelder/225112 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# Update all repositories in ~/code | |
# Keep in ~/bin | |
trap "exit" INT | |
for dir in ~/code/* ; do | |
if [ -d $dir/.svn ] ; then | |
echo "Updating `basename $dir` (svn)" | |
svn update $dir | |
elif [ -d $dir/.git ] ; then | |
echo "Updating `basename $dir` (git)" | |
( cd $dir ; git pull ) | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment