Created
May 14, 2017 20:27
-
-
Save sampowers/215dabcd30d2e400b1823ed1eecc476e to your computer and use it in GitHub Desktop.
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 | |
# Downloads the latest chromedriver url, re-using the data provided by the maven webdriver installer plugin. Depends on jq but not maven. | |
function chromedriver_linux_64_latest_url () { | |
curl -s https://raw.githubusercontent.com/webdriverextensions/webdriverextensions-maven-plugin-repository/master/repository-3.0.json \ | |
| jq -r ' | |
[.drivers[] | |
| select(.name == "chromedriver") | |
| select(.platform == "linux") | |
| select(.bit == "64") | |
][0].url' | |
} | |
echo "Fetching latest chromedriver binary" | |
curl --progress-bar -Lo /tmp/chromedriver $(chromedriver_linux_64_latest_url) | |
mv /tmp/chromedriver /usr/local/bin/chromedriver | |
chmod +x /usr/local/bin/chromedriver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment