Skip to content

Instantly share code, notes, and snippets.

@shigeyas
Created December 10, 2009 04:19
Show Gist options
  • Save shigeyas/253107 to your computer and use it in GitHub Desktop.
Save shigeyas/253107 to your computer and use it in GitHub Desktop.
Script to update all ports and clean all builds
#!/bin/sh
# Script to update all ports and clean old builds
# Uncomment following to make build process noisier
#VERBOSE=-v
(for i in "sync" "selfupdate" "clean --dist outdated" "-p upgrade outdated" "-u
uninstall"
do
echo echo \'"==> port $i"\'
echo port $VERBOSE $i
done ) >/tmp/portupdate$$
START=`date`
echo Running following port commands as super user..
echo ===
cat /tmp/portupdate$$
echo ===
sudo sh /tmp/portupdate$$
END=`date`
echo "START: $START"
echo "END: $END"
/bin/rm -f /tmp/portupdate$$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment