Thursday, February 26, 2009

Ports!

It's been a couple months since I last formatted my computer, and I hadn't reinstalled macports until tonight. I was procrastinating because I remembered it being a pain to set up the first time. Turns out I was just a noob back then ^.^

went to the macports site and got the latest version to install. then just clicked through the install w/o any changes. It was kindof an accident. I do it a lot because I fail to see the 'customize' button in OSX installer before I click through to the next page(It's all alone in the bottom left of the window; who looks at the bottom left of windows?!). Luckily I knew that macports wants to install everything in /opt/local/bin.

All that was left was to change PATH variable to let my execute macports' apps from any directory. Another key step was to add macports' man pages to my MANPATH variable. I think that this was the part that I found confusing when I first installed macports, because I wasn't aware that MANPATH existed. None-the-less I was confused when I couldn't read man pages for the apps I ported.

yadda yadda yadda.... open my bashrc file to add these paths:
sudo vim /etc/bashrc

If you don't use vim for text-editing, I highly recommend it. To learn more you can just execute the command in the terminal:
vimtutor

The tutorial is a text file and you learn how to edit in vim it as you read it. Pretty clever, but not what we came to do.. back to bashrc.

Add the following lines to your bashrc file:
PATH="/opt/local/bin/:/opt/local/sbin/:$PATH"
MANPATH="/opt/local/man/:$MANPATH"

Save and exit your text editor(:wq in vim), and tada! All bash terminals you launch from now on will let you launch your macports apps.

To load the changes into your current terminal session type (note the space between the period and slash)
. /etc/bashrc

Thats all there is to it ^.^

Labels: , ,

1 Comments:

Blogger Dirtylaundry said...

its soo easy thx!

March 6, 2009 at 11:48 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home