Last active
February 7, 2016 10:06
-
-
Save jacob-s-son/2e7e9b9744a204e72bd1 to your computer and use it in GitHub Desktop.
chromedriver.sh
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 a newer version of Chromedriver, https://sites.google.com/a/chromium.org/chromedriver/ | |
# | |
# Include in your builds via | |
# \curl -sSL https://gist.githubusercontent.com/jacob-s-son/2e7e9b9744a204e72bd1/raw/92c46fbed6bfc32e7b15c660b53d2a33c277fe0e/chromedriver.sh | | bash -s | |
LATEST=$(wget -q -O - http://chromedriver.storage.googleapis.com/LATEST_RELEASE) | |
CHROME_DRIVER_URL="https://chromedriver.storage.googleapis.com/$LATEST/chromedriver_linux64.zip" | |
CACHED_DOWNLOAD="${HOME}/cache/chromedriver.zip" | |
CACHED_EXECUTABLE="${HOME}/cache/chromedriver" | |
# exit on the first error | |
set -e | |
# download and symlink latest version | |
wget --continue --output-document "${CACHED_DOWNLOAD}" "${CHROME_DRIVER_URL}" | |
unzip -u "${CACHED_DOWNLOAD}" -d "${HOME}/cache" | |
chmod u+x "${CACHED_EXECUTABLE}" | |
ln -sf "${CACHED_EXECUTABLE}" "${HOME}/bin/chromedriver" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment