Skip to content

Instantly share code, notes, and snippets.

@drbyte
Created May 23, 2020 03:51
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 drbyte/ba5680ee93ae24c2bc7938afea08931f to your computer and use it in GitHub Desktop.
Save drbyte/ba5680ee93ae24c2bc7938afea08931f to your computer and use it in GitHub Desktop.
Dusk Chrome Update bash script MacOS
#!/bin/bash
# https://chromedriver.storage.googleapis.com/LATEST_RELEASE
# https://chromedriver.storage.googleapis.com/%s/chromedriver_mac64.zip
# unzip
# mv chromedriver /vendor/laravel/dusk/bin/chromedriver-mac
if [ ! -f "./vendor/laravel/dusk/bin/chromedriver-mac" ]; then echo 'No Dusk Dir.' && exit 1; fi
a=$(uname -m) &&
rm -r ~/Downloads/chromedriver/
mkdir ~/Downloads/chromedriver/ &&
wget -O ~/Downloads/chromedriver/LATEST_RELEASE https://chromedriver.storage.googleapis.com/LATEST_RELEASE &&
if [ $a == i686 ]; then b=32; elif [ $a == x86_64 ]; then b=64; fi &&
latest=$(cat ~/Downloads/chromedriver/LATEST_RELEASE) &&
wget -O ~/Downloads/chromedriver/chromedriver.zip 'https://chromedriver.storage.googleapis.com/'$latest'/chromedriver_mac'$b'.zip' &&
#sudo unzip ~/Downloads/chromedriver/chromedriver.zip chromedriver -d /usr/local/bin/ &&
unzip ~/Downloads/chromedriver/chromedriver.zip chromedriver -d ~/Downloads/chromedriver &&
mv ~/Downloads/chromedriver/chromedriver vendor/laravel/dusk/bin/chromedriver-mac &&
echo 'success'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment