Skip to content

Instantly share code, notes, and snippets.

@Raphhh
Last active October 26, 2021 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raphhh/17b6cd288e7a81af6355278982d22a9a to your computer and use it in GitHub Desktop.
Save Raphhh/17b6cd288e7a81af6355278982d22a9a to your computer and use it in GitHub Desktop.
Get the version of chromedriver according to a chrome version. Usage `$ google-chrome --version | ./chromedriver_get_version.sh`. See https://chromedriver.chromium.org/downloads/version-selection
#!/bin/bash
chrome_version=$(cat <&0 | grep -o '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*')
wget -O- -q "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$chrome_version" | grep -o '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment