-
-
Save julienXX/123659 to your computer and use it in GitHub Desktop.
Retrieve current Chromium build for Mac OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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