-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchromedriver.bits
More file actions
39 lines (31 loc) · 889 Bytes
/
chromedriver.bits
File metadata and controls
39 lines (31 loc) · 889 Bytes
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
38
39
#!/bin/bash
#-----------
# VARIABLES
#-----------
CHROMEDRIVER_VERSION=${CHROMEDRIVER_VERSION-2.21}
#-----------
# HELPERS
#-----------
set_env()
{
KEY=$1
VAL=$2
echo "export $KEY=$VAL" >> $HOME/.bash_aliases
}
#-----------
# INSTALLER
#-----------
apt-get -f -y install && \
apt-get install -y --force-yes unzip xvfb libxss1 libappindicator1 libindicator7 xdg-utils && \
mkdir -p /opt/chrome && \
cd /opt/chrome && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
dpkg -i google-chrome*.deb && \
apt-get install -f && \
mkdir -p /opt/chromedriver && \
cd /opt/chromedriver && \
wget -N http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip && \
unzip chromedriver_linux64.zip && \
set_env PATH "/opt/chromedriver:\$PATH"
source $HOME/.bash_aliases
touch /opt/chromedriver.bits