I’ve recently been smitten with Chromium for OS X (I use plain vanilla Chrome on Windows XP at work now). As of this post only Chromium will allow extensions on OS X. I’ve wanted an easy way to update to the daily snapshot. I’m sure there are people who have done something similar to what I have done, but in the interest of recreating the wheel, here’s my solution.
The script is pretty simple, and is not well tested or up to snuff in terms of security (some nasty exec exploits are the first of the problems). Further, since it does (attempt to) copy the Chromium.app package to your Applications directory there is possibility for some serious problems if Chromium is running and the tests to check this fail. Really, if anything fails, it could be ugly. This is only intended for running on your own local machine, and I assume no responsibility if things go south.
With the procedural matters out of the way, here’s the script (download):
Copy this script to somewhere convenient and run in your command line (Applications->Utilities->Terminal) using the following syntax :
php -f updateChromium.php
The script will check to see if Chromium is already running (and abort if Chromium is running). If Chromium is not running it will download the latest snapshot from the Chromium build bot and then copy the application into your Applications directory.
You may want to put the script on your crontab, as such:
(in your command line)
Then type i. Now that we are in “insert” mode, type:
0 0 * * * php -f <locationToUpdateChromiumScript>/updateChromium.php
(This will set the script to run every day at midnight)
Then press ESC, and type wq. You should be issued a message that a new crontab has been installed.
I’ve updated the original php script slightly to better reflect use with the following Automator workflow/application. If you want to trigger the Chromium updates manually save the Automator workflow (zip archive), unzip the package, then open the workflow, change the default script location if you want (it will prompt you when you run it), and then click File->Save As and change type value to Application. To start the update simply click the resulting application. Voice and Growl notifications will notify you of script completion.
Download Automator workflow