Using macports from git source

Share on:

I’m publishing this script that configures macports from the github source. This method gets you the ports base and ports themselvs from the master branch of git. I have found that using mac ports this way enables support for bleeding edge OS versions or CPU architectures.

Grab the code :



1 ./macports -ip

Running the script with these options will install macports and all the ports listed in the portfile. Setting up new systems or VMs with ports is fully automated with these options.


1   -c    Fully remove macports

The cleanup option is very heavy handed and nukes all the macports direcotries and files.

1   -i    Install macports and ports tree from git

Installing will pull down the ports base and ports git repos from github. Compiling ports base and syncing the ports tree is also part of install.

1   -p    Install ports from file list

The port install command will iterate over the list of ports. Port variants can be specified as well.

1   -u    Upgrade installed ports

Upgrade will check for ports base updates, port list updates & update as needed.

1   -h    Help

Use the help on the cli for a reminder of the options


Functioning Xcode installation is a prerequisite

Updating your path to inlcude /opt/local/bin is not implimented in the script. See this page for configuring your dotfiles appropriatly.