Skip to content

Instantly share code, notes, and snippets.

@jelder
Created November 3, 2009 15:21
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 jelder/225112 to your computer and use it in GitHub Desktop.
Save jelder/225112 to your computer and use it in GitHub Desktop.
#!/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