Created
December 13, 2020 17:15
-
-
Save mylk/c6dffbcbbe25230307a5caf068ced8a4 to your computer and use it in GitHub Desktop.
Downloads the suitable chromedriver for your Chrome browser version
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
#!/bin/bash | |
CHROME_VERSION=`google-chrome-stable --version | awk '{print($3)}' | awk -F '.' '{print($1"."$2"."$3)}'` | |
CHROMEDRIVER_VERSION=`curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}"` | |
echo "Chrome version: ${CHROME_VERSION}" | |
echo "Suitable chromedriver version: ${CHROMEDRIVER_VERSION}" | |
echo "" | |
echo "Downloading chromedriver..." | |
curl -s -o chromedriver_linux64.zip "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" | |
echo "Downloaded!" | |
echo "" | |
echo "Unzipping..." | |
unzip chromedriver_linux64.zip | |
rm chromedriver_linux64.zip | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment