SF Cable Car Route Llamas, Alpacas and Mutants Fall Colors Mardi Himal Trail Golden Gate Zabriskie Point Prayer Flags Sunset Chinchero at Sunset Annapurna South in the Early Morning Fish Market Cementerio de Trenes de Uyuni Night Cats Sunset From Moro Rock Very rare deserted street Half Dome at Sunset Machhapuchhre Sunset from Marshall Beach, SF Grafitti The Danube at Night Annapurna South Under the Stars Mardi Himal Trail Rolling Fog Prepping to FIght Boudhanath Stupa Sheepherders and Annapurna South Cumhuriyet Anıtı Phewa Boats Alamo Square Bluebird Skies Stars Over Annapurna South White Mountains Sunset Fog Rolling In Half Dome at Sunset Vocano Scarred Mountains The Golden Gate at Night Old Man in Siding Twilight Fog Market Flags Bodie Eastern Sierras Under Shadow Snow and Shadows Temple Statue Marin Headlands Sand Dunes Hong Kong from the Peak Bay Area Sunrise Yosemite Fall Leaves Monument Valley Green River Canyons at Sunrise The Blue Mosque Buildings and a Bridge Cropped Crosswalk Headfirst Pisac Hillside The Buttermilks Rooster Fights at Forest Camp Resting Zabriskie Point Photographers Annapurna South

Homebrew Package Update Notifications via Growl

September 20, 2011 —

Over the weekend, I finally upgraded my system to Mac OS Lion. I also took the opportunity to do a completely fresh install of my system, doing a final TimeMachine backup before erasing the hard drive and then installing Lion off a USB thumb drive.

I have long used MacPorts as my open source package manager, but I've had issues recently with certain ports not being updated or being out of date. So I was really interested in Homebrew. The fact that it is all on github, open and actively developed really appealed to me. After getting it up and running, I wanted to port my package update notifier to use Homebrew. Doing so was really quite easy. Here's what I came up with, which is also in my dotfiles on github:

Assuming the script is at ~/bin/brew-update-notifier, you can install the script to a crontab by running sudo crontab -e, then adding the line 0 12 * * * /Users/<username>/bin/brew-update-notifier to the end of the file (substituting <username> for your username, or wherever you've put the script). I've chosen to run the script every day at noon because my computer is likely to be on and connected to a network.