Skip to content

Instantly share code, notes, and snippets.

@ssaadh
Last active March 15, 2017 17:34
Show Gist options
  • Save ssaadh/57d7f7dd0145c36639ad5be50ad19bac to your computer and use it in GitHub Desktop.
Save ssaadh/57d7f7dd0145c36639ad5be50ad19bac to your computer and use it in GitHub Desktop.
# because I'll already have a chromedriver installed
sudo mv -f /usr/local/bin/chromedriver /usr/local/bin/chromedriver-old
sudo apt-get install unzip &&
a=$(uname -m) &&
rm -r /tmp/chromedriver/
mkdir /tmp/chromedriver/ &&
wget -O /tmp/chromedriver/LATEST_RELEASE http://chromedriver.storage.googleapis.com/LATEST_RELEASE &&
if [ $a == i686 ]; then b=32; elif [ $a == x86_64 ]; then b=64; fi &&
latest=$(cat /tmp/chromedriver/LATEST_RELEASE) &&
wget -O /tmp/chromedriver/chromedriver.zip 'http://chromedriver.storage.googleapis.com/'$latest'/chromedriver_linux'$b'.zip' &&
sudo unzip /tmp/chromedriver/chromedriver.zip chromedriver -d /usr/local/bin/
# not sure if symlinking again is needed but whatevz!
sudo ln -sf /usr/local/bin/chromedriver /usr/bin && echo 'success?'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment