Created
March 6, 2015 22:06
-
-
Save toshsan/cc56e90a2b66cfd79608 to your computer and use it in GitHub Desktop.
enlist recursive trunks from Subversion
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/sh | |
| if [ "help$1"=="help" ] || [ "$1"=="help" ]; then | |
| echo "usage--- \nenlist http://svn/rootpath" | |
| exit 1 | |
| fi | |
| URL=$1 | |
| ROOTDIRS=$(svn ls $URL) | |
| for DIR in $ROOTDIRS; do | |
| trunk="$URL/${DIR}trunk" | |
| echo "$DIR" | |
| if [ ! -d $DIR ] && $(svn info $trunk >/dev/null 2>/dev/null) ; then | |
| echo "Enlisting: $DIR from $trunk" | |
| svn co $trunk $DIR | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment