Created
August 7, 2011 01:39
-
-
Save lg/1129968 to your computer and use it in GitHub Desktop.
Download Latest Nightly Chromium For Mac
This file contains 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
if [ $(ps aux | grep "Chromium.app" | grep -v grep | wc -l) -gt 0 ]; then | |
echo "Please close all Chromium instances before running this script" | |
exit 1 | |
fi | |
if [ $(whoami) != "root" ]; then | |
echo "Please run this script with sudo to allow for installation into /Applications" | |
exit 1 | |
fi | |
echo "Getting latest version number" | |
LATEST_VERSION=$(curl -s "http://build.chromium.org/f/chromium/snapshots/Mac/LATEST") | |
URL="http://build.chromium.org/f/chromium/snapshots/Mac/$LATEST_VERSION/chrome-mac.zip" | |
echo "Downloading latest version from $URL" | |
rm -f /tmp/chrome-mac.zip | |
rm -rf /tmp/chrome-mac | |
curl --fail --output /tmp/chrome-mac.zip "$URL" | |
if [ ! -f /tmp/chrome-mac.zip ]; then | |
echo "The download failed, look at the output above" | |
exit 1 | |
fi | |
echo "Unzipping and putting into /Applications" | |
if ! unzip -q -d /tmp/ /tmp/chrome-mac.zip; then exit 1; fi | |
rm -rf /Applications/Chromium.app/ | |
mv /tmp/chrome-mac/Chromium.app/ /Applications/Chromium.app | |
rm -rf /tmp/chrome-mac | |
rm -f /tmp/chrome-mac.zip | |
echo "Done! Enjoy the latest build of Chromium! -- Larry Gadea <[email protected]>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment