Skip to content

Instantly share code, notes, and snippets.

@flyingoctopus
Forked from lg/dlchromium.sh
Created April 16, 2012 21:48
Show Gist options
  • Save flyingoctopus/2401841 to your computer and use it in GitHub Desktop.
Save flyingoctopus/2401841 to your computer and use it in GitHub Desktop.
Download Latest Nightly Chromium For Mac
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