I"m curious about why it's written in sh, given that it's OS X only and OS X includes by default many languages significantly less crappy than Borne Shell.
I like to challenge myself to write little things like this as shell-scripts, too. But I am surprised they didn't at least choose use Bash instead of Bourne shell.