Created
May 23, 2020 03:51
-
-
Save drbyte/ba5680ee93ae24c2bc7938afea08931f to your computer and use it in GitHub Desktop.
Dusk Chrome Update bash script MacOS
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 | |
# 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