Skip to content

Instantly share code, notes, and snippets.

@proprietary
Last active October 1, 2019 00:03
Show Gist options
  • Save proprietary/56855179ea35ad521232cbbf07265521 to your computer and use it in GitHub Desktop.
Save proprietary/56855179ea35ad521232cbbf07265521 to your computer and use it in GitHub Desktop.
Download Chromium on Linux, Windows, or MacOS
#!/bin/bash
# Download portable binaries of Chromium
# Usage: ./download-chromium.sh {windows,linux,mac} > chromium.zip
#
# If these URLs stop working, this should have it:
# https://github.com/GoogleChrome/puppeteer/blob/master/lib/BrowserFetcher.js
if [ "$1" = "linux" ] ; then
CHROMIUM_PLATFORM=Linux_x64
ZIP_FILE=chrome-linux.zip
elif [ "$1" = "windows" ] ; then
CHROMIUM_PLATFORM=Win_x64
ZIP_FILE=chrome-win.zip
elif [ "$1" = "mac" ] ; then
CHROMIUM_PLATFORM=Mac
ZIP_FILE=chrome-mac.zip
else
exit 1
fi
CHROMIUM_ROOT="http://commondatastorage.googleapis.com/chromium-browser-snapshots/$CHROMIUM_PLATFORM"
CHROMIUM_LATEST=`wget -q -O - "$CHROMIUM_ROOT/LAST_CHANGE"`
wget -q -O - "$CHROMIUM_ROOT/$CHROMIUM_LATEST/$ZIP_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment