Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julienXX/123659 to your computer and use it in GitHub Desktop.
Save julienXX/123659 to your computer and use it in GitHub Desktop.
Retrieve current Chromium build for Mac OS X
#!/bin/bash
set -e
BUILD_URL='http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/'
update_google_chrome() {
get_latest_revision_number
download_latest_revision
extract_code
install_chrome
display_latest_changes
}
get_latest_revision_number() {
LATEST=`curl $BUILD_URL/LATEST`
}
# Added a test for ~/src existence
download_latest_revision() {
(if [ -d ~/src ]; then
cd ~/src && curl -O $BUILD_URL/$LATEST/chrome-mac.zip
else
mkdir ~/src && cd ~/src && curl -O $BUILD_URL/$LATEST/chrome-mac.zip
fi)
}
extract_code() {
(cd ~/src &&
unzip -qq chrome-mac.zip)
}
install_chrome() {
(cd ~/src/chrome-mac &&
cp -fr Chromium.app /Applications &&
cd .. &&
rm -rf chrome-mac)
}
display_latest_changes() {
curl $BUILD_URL/$LATEST/changelog.xml
}
update_google_chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment