Skip to content

Instantly share code, notes, and snippets.

@evotopid
Created September 19, 2011 13:43
Show Gist options
  • Save evotopid/1226525 to your computer and use it in GitHub Desktop.
Save evotopid/1226525 to your computer and use it in GitHub Desktop.
Chromium Updater - Mac OS X

Information

This is an updater script for the open source Web browser Chromium for the people (probably mostly developers) who want to stay on the bleeding edge version of Chromium.

It's made for Mac OS X. It downloads a copy from the build server and unpacks it to the right destination. You should shut down Chromium before running this, because it could lead to various problems if you don't.

Requirements

  • wget You'll have to install wget, if you haven't already, the easiest way would be to use homebrew.

License

This script is licensed under the public domain, but it would be great, if you could share the changes you made, to the script.

#!/bin/bash
# @source https://gist.github.com/gists/1226525
# fetch the most recent version's number
VERSION=$(wget http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/LAST_CHANGE -q -O -)
echo "Updating Chromium to version: $VERSION"
# download binary
REMOTE_PATH="http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/$VERSION/chrome-mac.zip"
DESTINATION_FILE="chrome-build.zip"
wget $REMOTE_PATH -O $DESTINATION_FILE
DESTINATION_DIR="Chromium_BUILD"
unzip -q -d $DESTINATION_DIR $DESTINATION_FILE
# delete old
rm -rf /Applications/Chromium.app
# move new
mv $DESTINATION_DIR/chrome-mac/Chromium.app /Applications
# delete temp files
rm $DESTINATION_FILE
rm -rf $DESTINATION_DIR
# display message
echo "Succesfully installed Chromium $VERSION."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment