Created
May 31, 2013 22:41
-
-
Save stefanlasiewski/5688419 to your computer and use it in GitHub Desktop.
Update MacPorts base to latest released version using 'selfupdate', Then upgrade all outdated ports (upgrade outdated), and uninstall old version of each port (-u)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Update MacPorts base to latest released version using 'selfupdate' | |
# Then upgrade all outdated ports (upgrade outdated), and uninstall old version of each port (-u) | |
# http://guide.macports.org/#using.common-tasks.updating | |
# http://guide.macports.org/#using.port.upgrade | |
# Can be called from Cron | |
################################################################################ | |
ME=`basename $0` | |
doit () { | |
PATH=$PATH:/usr/local/bin | |
port selfupdate && \ | |
port -u upgrade outdated | |
} | |
# Run command, and send logs to syslog | |
doit 2>&1 | /usr/bin/logger -t $ME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment