Skip to content

Instantly share code, notes, and snippets.

@danbeam
Created May 19, 2011 21:29
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 danbeam/981792 to your computer and use it in GitHub Desktop.
Save danbeam/981792 to your computer and use it in GitHub Desktop.
svn-root.sh
# find the root of the local svn checkout
svnroot() {
[ -d $1/.svn ] && svnroot $1/../ $1 || ( cd ${2:-$1} && echo $PWD );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment