Skip to content

Instantly share code, notes, and snippets.

@c9s
Created October 14, 2009 05:38
Show Gist options
  • Save c9s/209824 to your computer and use it in GitHub Desktop.
Save c9s/209824 to your computer and use it in GitHub Desktop.
install macports from svn
#!/bin/bash
source=/opt/local/etc/macports/sources.conf
install=/opt/mports
echo [[ Cleaning up $install ]]
rm -rf $install
echo [[ Subversion checkout ]]
svn checkout http://svn.macports.org/repository/macports/trunk $install
echo [[ Installin Subversion Macports ]]
cd $install/base
./configure --enable-readline && make && make install && make distclean > /dev/null
echo [[ Add svn to source ]]
perl -i -pe 's{^(?!#)}{#}' $source
echo file://$install/dports/ [default] >> $source
echo [[ Sync ]]
port sync
echo [[ Selfupdate ]]
port -v selfupdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment