Created
June 1, 2013 01:36
-
-
Save benclark/5688972 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 | |
# | |
# this script should not be run directly, | |
# instead you need to source it from your .bashrc, | |
# by adding this line: | |
# . PATH_TO_SCRIPT/goto_repo.sh | |
function repo() { | |
reponame=$1 | |
basedir="$HOME/Sites/$reponame" | |
if [ -d "$basedir/repo" ]; then | |
cd "$basedir/repo" | |
elif [ -d "$basedir/trunk" ]; then | |
cd "$basedir/trunk" | |
elif [ -d "$basedir" ]; then | |
cd "$basedir" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment