« Vanderbilt University football schedule for the iPhone/iPod TouchUsing git commit count as an incremental build numbering system »

My update WebKit script

There’s a bunch of WebKit updating scripts on the internet. If you’re unfamiliar, WebKit is the open source browser engine that’s basically a preview of the next Safari. It’s as fully featured as Safari although it doesn’t play as well with plugins from time to time (mostly just warning you about plugins at first launch). In any case, it’s a lot of fun to play around with, especially if you develop web pages. Since WebKit is updated every day, frequent updating is recommended. WebKit doesn’t have a built-in updater (unless you count that it takes you to a page to download the new version if its out of date) so some scripts have been written to do it automatically.

I wrote another script. My script is located on this gist page. It’s a basic shell script that should run without modification on any version of OS X. I wrote my script in response to a few problems I had with other scripts. First, other scripts seemed unnecessarily complicated. There’s a lot of file cleanup and whatnot. Other scripts also appear to use overly complicated methods of getting the revision number and locating the download url. I fixed the cleanup problem by mounting a remote disk image (which is something I bet other writers simply weren’t aware hdiutil could do). I also think my way of getting the revision number is a bit more readable. Mine also integrates with Growl via growlnotify (in the Extras folder of the Growl disk image). The download link is hardcoded into the script but I don’t foresee the WebKit team changing it any time soon.

Many other scripts also have a launchd property list that will automatically download WebKit every night. I don’t need WebKit updated every night and my computer isn’t always running or connected to the internet when it’d run. Instead, I like to run it via FastScripts when I want to make an easy update.

View updateWebkit.sh.

Leave a Reply