To convert a set of subversion repos in ~/svn to git repos in ~/git

set -e
git config svn.authorsfile << EOF
joe = Joe Milbourn <joe.milbourn+git@gmail.com>
EOF
mkdir ~/git_tmp
cd ~/git_tmp
for x in ~/svn/*;
do
    repo=$(basename $x)
    mkdir $repo
    pushd $repo
    git svn init file://$HOME/svn/$repo --no-metadata
    git svn fetch
    popd
    git clone --bare $repo ~/git/$repo
done
rm -rf git_tmp