-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
get-gecko-driver.sh
executable file
·30 lines (29 loc) · 1006 Bytes
/
get-gecko-driver.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
echo "-----------------------------"
echo "*** Verifying geckodriver ***"
if [ ! -f "geckodriver" ]; then
OS="`uname`"
case $OS in
'Darwin')
OS='Mac'
curl -OL https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-macos.tar.gz
tar xvfz geckodriver-v0.18.0-macos.tar.gz
rm geckodriver-v0.18.0-macos.tar.gz
;;
'Linux')
OS='Linux'
curl -OL https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz
tar xvfz geckodriver-v0.18.0-linux64.tar.gz
rm geckodriver-v0.18.0-linux64.tar.gz
;;
'WindowsNT')
OS='Windows'
curl -OL https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-win64.tar.gz
tar xvfz geckodriver-v0.18.0-win64.tar.gz
rm geckodriver-v0.18.0-win64.tar.gz
;;
*) ;;
esac
else
echo "file 'geckodriver' already exists"
fi