If you use the MacPorts and Fink package managers, you might find it useful to be able to update both package managers with one simple command. I wrote the following simple script which does just that:
#!/bin/bash
#the script updates MacPorts and Fink packages;
if [ "$(whoami)" != 'root' ]; then
echo "You have no permission to run $0 as non-root user."
exit 1
fi
port selfupdate
port -d sync
portindex
port upgrade installed
apt-get update
apt-get upgrade
fink -q -y selfupdate
fink -q -y update-all
Just create a file containing that code and save it, say, to your home folder. Assuming that the file's been saved as ~you/updf (where you is your short username), just cd to that directory and make the code executable:
chmod u+x upfg
If it's not already set, you might also add the line PATH=$PATH:~you to your profile. Then simply type sudo upfd, wait a little bit, and you're done. Hopefully, that is, if there are no compilation errors, but that's another story!
Mac OS X Hints
http://hints.macworld.com/article.php?story=20061228064442549