Created
November 9, 2011 22:14
-
-
Save rmehner/1353275 to your computer and use it in GitHub Desktop.
Download the latest chromium build, fixed from https://github.com/jmcantrell/misc/blob/master/bin/latest-chromium
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 | |
| # Install the latest Chromium mac nightly build, but only | |
| # if it's different from the currently installed version. | |
| build_url="http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac" | |
| install_dir="/Applications/Chromium.app" | |
| # Determine the currently installed chromium build number | |
| if [[ -d $install_dir ]]; then | |
| current=$(defaults read "$install_dir/Contents/Info" SVNRevision) | |
| else | |
| current=0 | |
| fi | |
| # Most recent version build available from google | |
| latest=$(curl "$build_url/LAST_CHANGE") | |
| if [[ $current != $latest ]]; then | |
| echo "==> Fetching Chromium build $latest" >&2 | |
| # setup a temp dir to do some work | |
| tmpdir=$(mktemp -d -t "$(basename "$0").XXX"); cd "$tmpdir" | |
| trap "cd && rm -rf $tmpdir" INT TERM EXIT | |
| # fetch it | |
| wget "$build_url/$latest/chrome-mac.zip" | |
| printf "\n==> Extracting ...\n" 1>&2 | |
| unzip -q chrome-mac.zip | |
| rm -rf "$install_dir" | |
| # move the new one into place | |
| mv "chrome-mac/Chromium.app" "$install_dir" | |
| echo "==> Chromium upgraded to build $latest (from $current)." | |
| else | |
| echo "==> You already have build $latest." 1>&2 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment