-
Notifications
You must be signed in to change notification settings - Fork 2
/
geckodriver.sh
37 lines (34 loc) · 1.15 KB
/
geckodriver.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
31
32
33
34
35
36
37
#!/bin/sh
os=$(uname -s)
arch=$(uname -m)
if [ $os = "Linux" ] ; then
case "$arch" in
i386 | i486 | i786 | x86)
url=https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux32.tar.gz
;;
x86_64 | x86-64 | x64 | amd64)
url=https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
;;
xscale | arm | armv61 | armv71 | armv81 | aarch64 | armv7l )
url=https://github.com/shneezin/breitbandmessung/raw/main/geckodriver-v0.31.0-linuxarm32.tar.gz
;;
aarch64)
url=https://github.com/shneezin/breitbandmessung/raw/main/geckodriver-v0.31.0-linux-aarch64.tar.gz
;;
*)
echo Architecture not supported: $arch
exit 1
;;
esac
elif [ $os = "Darwin" ] ; then
url=https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-macos.tar.gz
fi
if [ -z $url ] ; then
echo OS not supported: $os
exit 1
fi
echo $os
echo $arch
curl -s -L "$url" | tar -xz
chmod +x geckodriver
mv geckodriver /usr/bin