Sunday, August 22, 2010

Script to automatically check for outdated ports on Mac OS X

I use the fabulous MacPorts system to get some of the software I need for my Mac laptop.

I am also interested in keeping this software up to date, for a variety of reasons, but just to know that I'm getting the latest security patches alone has me interested in regular updates.

I hate checking for outdated ports manually over and over again though, aren't computers supposed to do that?

So I wrote a script that will periodically check if I have outdated ports, and if there are any it will send me an email with a list of the outdated ones.

You can fetch the script port-checkupdate from my website - there are some comments in the script, and it's really tiny so it should be easy to work with.

You will likely also want the mailtest self-contained mailer my friend Marek Gilbert knocked together as well - the script expects to use it

Cheers

1 comment:

Mike Hardy said...

It appears my first take on the script was susceptible to the "Thundering Herd Problem" (http://en.wikipedia.org/wiki/Thundering_herd_problem) as the port update wasn't succeeding.

Further, the logging left a little to be desired because it was hard to figure out.

I've updated the script at the link above to have better logging, and have a random sleep so that it should work better

Cheers!