Created
February 1, 2010 14:51
-
-
Save kristianmandrup/291725 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
Homebrew is the way of the future.. | |
1. Save list of installed ports | |
2. Uninstall macports | |
3. Install Homebrew | |
4. Install old ports using brew | |
1. Save list of installed ports | |
---------------------------- | |
1. port installed > ports_installed.txt | |
2. mate ports_installed.txt | |
Delete top line "The following..." | |
Select All (CMD-A) | |
Indent all one tab left (Alt-Shift-Tab) | |
Replace all txt after @ on each line | |
- CMD-F | |
- Find: @.* | |
- Replace: | |
- Check regular expression | |
- Click "Replace all" | |
Save file as ports_installed_clean.txt | |
3. Clean up to only have unique entries (no duplicates!) | |
$ sort ports_installed_clean.txt | uniq -u > unique_ports_installed.txt | |
2. Uninstall Macports | |
--------------------- | |
http://guide.macports.org/chunked/installing.macports.uninstalling.html | |
$ sudo port -f uninstall installed | |
$ sudo rm -rf \ | |
/opt/local \ | |
/Applications/DarwinPorts \ | |
/Applications/MacPorts \ | |
/Library/LaunchDaemons/org.macports.* \ | |
/Library/Receipts/DarwinPorts*.pkg \ | |
/Library/Receipts/MacPorts*.pkg \ | |
/Library/StartupItems/DarwinPortsStartup \ | |
/Library/Tcl/darwinports1.0 \ | |
/Library/Tcl/macports1.0 \ | |
~/.macports | |
3. Install Homebrew | |
------------------- | |
Run mislav's Gist recipe! | |
4. Create script to run through unique_ports_installed.txt and call for each port_name (each line) | |
$ brew install [port_name] | |
PS: Not sure how well this would work in practice!? | |
http://wiki.github.com/mxcl/homebrew/the-brew-command | |
List of available brews | |
$ brew search | |
$ brew search > all_brews.txt | |
Search for brew equivalent of port | |
$ brew search [port_name] | |
5. Identify matching brews for ports | |
You could create a small script (ruby?) to run through list of brews and see if there is a port with the same name, then add the match to a port_brews.txt file. | |
Then run through port_brews.txt and install each brew. | |
Then we just need a mapper file to map those brews with a different name than the port(s) it replaces. Anyone? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BTW small bug here
uniq -u
removes anything that is duplicated, so if you haveaom
twice, for example, then it won't appear in the output at all.