Created
June 17, 2011 13:46
-
-
Save saltybeagle/1031440 to your computer and use it in GitHub Desktop.
Script to switch all svn.php.net checkouts from http to https
This file contains 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
for dir in `ls -1 */.svn/entries | xargs grep -H -l svn.php.net | grep -E -o "^[^\/]+"`; do | |
svn switch --relocate `svn info $dir | grep ^Repository\ Root | cut -f 3 -d ' '` `svn info $dir | grep ^Repository\ Root | cut -f 3 -d ' ' | sed 's/http:/https:/'` $dir | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Eclipse I have every project checked out in ~/workspace/ so every project on http://svn.php.net would need to be switched to https://svn.php.net. This shell script handled all the svn switch –relocate statements for me.
It may be best to make a backup of your project directories, especially if you have local uncommitted changes. This script works on bash-like command lines, such as Mac OS X.
cd ~/workspace
and run./svnswitchall.sh