Blue Static

Archive for the ‘webkit’ tag

WebKit Cron Downloader

Posted on February 6, 2008 at 02:53 UTC, filed under the category Uncategorized. Tags: mac os x, ruby, safari, webkit,

I’ve recently been doing some work on WebKit and I want to run the latest nightly builds of Safari/WebKit so I’m no longer plagued by a bug I patched. I don’t want to have to manually download the most recent nightly build and place it in my Applications folder, I want it done for me.

According to the WebKit FAQ, there’s software to do this for you, but it didn’t work for me when I downloaded it (I don’t think the symlink to the latest build works, which is what it relied on). So, I wrote my own cron script to do it.

The script is written in Ruby and I have my cronjob set up like such:

30 21 * * * ~/Library/Shell/webkit-download.rb

Basic operation of the script:

  1. Grab the contents of nightly.webkit.org
  2. Find the path to the latest DMG
  3. Download and mount the DMG
  4. Move the old /Applications/WebKit.app to the trash and date-stamp it
  5. Copy the latest WebKit.app from the DMG and then umount

If you’re interested, you can get the script here:

webkit-download.rb (~1.4 KB)