[wiki:howto <- Back to the HOWTO section] = Advanced Daily Administration of MacPorts = * Audience: advanced users * Requires: MacPorts >=1.9.2 * Author: Bjarne D Mathiesen - macintosh _at_ mathiesen _dot_ info == Introduction == This is a dump of my scripts to administer MacPorts on a daily basis. Please append comments, questions, and suggestions here. == The Scripts == === Script 0: '''Default Values''' === {{{ declare prefix='/opt/local' declare version='2.6.4' }}} === Script 1: '''Installation''' === {{{ #!/usr/bin/env bash ################################################################################ # copyright Bjarne D Mathiesen # Korsør ; Danmark ; Europa # macintosh .at. mathiesen .dot. info # date 04/07-2007 # revised 02/12-2007 implemented automatic patching of Portfiles # 28/12-2009 fixed the download link # modified source/build directory # removed sudo from commands # 18/06-2011 added default values for the parameters # updated path values for XCode4 # 05/03-2017 added update to actions # 31/01-2018 added checkpaths & fixpaths # updated default values for the parameters # 02/03-2021 removed fixpaths # reworked setpaths # added fixCLT # # this script is released under the OSS GPL v3 license # the author welcomes feedback and improvements # ( cd $( dirname ${0} ) source ./portDefaults usage() { cat < /etc/paths echo "${prefix}/sbin" >> /etc/paths echo "/Applications/Xcode.app/Contents/Developer/usr/bin" > /etc/paths.d/888developer mkdir -p /etc/manpaths.d cp -np /etc/manpaths /etc/manpaths.orig mv -n /etc/manpaths /etc/manpaths.d/999macosx touch /etc/manpaths echo "${prefix}/share/man" > /etc/manpaths.d/000macports #echo "/Developer/usr/share/man" > /etc/manpaths.d/888developer #echo "/Developer/usr/X11/share/man" >> /etc/manpaths.d/888developer ;; ######################## # check the system paths ('checkpaths') /usr/libexec/path_helper ;; ################## # install macports ('install') if [ ! -e MacPorts-${version}.tar.gz ] then curl -O --url "https://distfiles.macports.org/MacPorts/MacPorts-${version}.tar.gz" fi rm -rf ./MacPorts-${version} tar -zxf MacPorts-${version}.tar.gz cd MacPorts-${version} #patch -p0 /dev/null diff -u \ ${prefix}${rsyncMacportsOrg}/${port#*/} \ ${port} \ > ${outputFile} echo "created patch for ${port}" mv ${port} ${port}.OK done ) ; wait }}} [wiki:howto <- Back to the HOWTO section]