Mac OSX Macports profile

November 14, 2009 § Leave a comment

MacPorts is required to store environmental variables in the shell. Usually .bash_profile or .bash_login will replace .profile in home directory ~. You can consider remove .profile or add content from .profile.

Again I would point .bash_profile to .bashrc as a single source for better MacPorts management.

You can view all the environment variables in terminal:
$ env

MacPorts paths are appended at the front of PATH so the MacPorts libraries will take precedence over vendor-supplied libraries for ported software at runtime.

Inside ~/.bashrc:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

To add directory /data/script to the beginning of the $PATH environment variable

PATH=/data/script:$PATH

To add that directory to the end of the path:
PATH=$PATH:/data/script

Note: Start a new terminal every time you update any profile file.

 


					
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Mac OSX Macports profile at Web Builders.

meta

%d bloggers like this: