#!/bin/sh for name in ${HOME}/src/*; do if [ -d ${name}/.svn ]; then echo -n "svn: " svn info ${name} | grep "^URL" | cut -d " " -f 2- elif [ -d ${name}/.git ]; then echo -n "git: " (cd ${name} && git config --get remote.origin.url) elif [ -d ${name}/.hg ]; then echo -n "hg: " # Hmm, what's the OTW to do this in Mercurial? (cd ${name} && hg showconfig | grep "paths.default=" | cut -d "=" -f 2-) fi done