Chromium Mac Build Bot Updater Script
Posted on | May 13, 2009 | 5 Comments
When I read on MacRumors that the Chromium builds for the Mac were available and were actually launching the “stupid” geek in me jumped at the opportunity to try the unfinished, unpolished software. By “stupid” I refer to the side of near any geek who sees the OOO SHINY and is fully prepared to deal with the instability and issues that will crop up with using pre-alpha/alpha software. Naturally when I saw how fast and furious the updates were happening alongside the fact there was no automatic update mechanism apparent in Chromium (I don’t have the Google Updater installed and don’t want to) I sought to find out how to automate the updates to make the pain of manual downloads, copies and such go away.
Using my previous WebKit script, 5 minutes looking at the Chromium application layout and how the builds are stored on the server I changed the script. I fully expect it to break horribly in the future as Google changes folder layouts and/or adds Chromium support to their own “silent” updating mechanism.
#! /bin/bash # Based off my WebKit nightly script (now defunct as WebKit uses Sparkle) # Copyright 2009 Micheal Jones # Software License: Do whatever you want. #Find current revision currentRevision=`/usr/libexec/PlistBuddy -c 'Print :SVNRevision' /Applications/Chromium.app/Contents/Info.plist` #Get latest revision latestRevision=`curl -s http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/LATEST` #Abort if there is no update if [ $latestRevision -le $currentRevision ] then echo "There is no update for Chromium available" exit fi #Append download address address='http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/'${latestRevision}'/chrome-mac.zip' echo "Downloading... $address" curl -s $address -o /tmp/chrome.zip #Abort if the build is not available if [ "`head -n 3 /tmp/chrome.zip | tail -n 1`" = "<title>404 Not Found</title>" ]; then echo "Latest Version is not available yet (try again in a couple minutes)" rm -rf /tmp/chrome-mac.zip exit fi #Unzip unzip /tmp/chrome.zip 1>/dev/null echo "Copying..." #Copy to Applications cp -RfL /tmp/chrome-mac/Chromium.app /Applications/ 2>/dev/null echo "Cleaning up..." #Clean up rm -rf /tmp/chrome* revision=`/usr/libexec/PlistBuddy -c 'Print :SVNRevision' /Applications/Chromium.app/Contents/Info.plist` echo "Finished. (r$revision)"
Realistically you should be looking for the latest source at the link below:
As always this script can be found in my git repository on GitHub.
Comments
5 Responses to “Chromium Mac Build Bot Updater Script”
Leave a Reply
May 29th, 2009 @ 10:00 am
Thanks!!! Very handy!
May 31st, 2009 @ 3:51 am
To one ‘stupid’ geek from an even ‘stupider’ one - Thanks! Just what I needed!
November 17th, 2009 @ 9:54 pm
Just so you know…this still works! If only I had discovered this back in May. I too have been “stupidly” using Chromium far before it was even remotely stable like it is these days!
January 6th, 2010 @ 7:56 pm
You might want to check if Chromium is running before extracting and installing the update, like so:
running=”$(ps aux | grep -v grep | grep Chromium)” if [ -n “$running” ] ; then echo ‘Chromium is currently running. Please quit Chromium before running the updater.’ exit fi
January 7th, 2010 @ 1:07 am
To be honest I never consider adding the check because I wanted something quick and dirty that would work (and assumed that anyone looking for it would know when to run it as well). I’ll add it to the blog post here and the git repository for any future users as sanity checks are a good thing.