Created
April 7, 2012 02:08
-
-
Save fracai/2324493 to your computer and use it in GitHub Desktop.
A script to update MacPorts, fetch outdated ports, compile them, remove the inactive duplicates, and then sign the archives.
This file contains 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 and list outdated software | |
HOST=$(hostname|sed "s/.local//") | |
/bin/echo "=== Update MacPorts" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/opt/local/bin/port selfupdate --nosync 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== Update Portfiles" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/opt/local/bin/port sync 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== List Outdated Ports" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/opt/local/bin/port echo outdated 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== Clean Outdated Ports" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/opt/local/bin/port clean outdated 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== Fetch Outdated Ports" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/opt/local/bin/port -p fetch outdated 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== Upgrade Outdated Ports (port -p upgrade --enforce-variants outdated)" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/opt/local/bin/port -p upgrade --enforce-variants outdated 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== List Inactive Duplicate Ports" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/opt/local/bin/port echo actinact and inactive 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== Uninstall Inactive Duplicate Ports" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/opt/local/bin/port uninstall actinact and inactive 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== Sign Archives" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/usr/local/bin/portsign.sh | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "=== Upgrade Done" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }' | |
/bin/echo "" | |
/bin/echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment