Skip to content

Commit

Permalink
replaced geckodriver links by their variables
Browse files Browse the repository at this point in the history
replaced geckodriver 64 and 32 links by their global variables
  • Loading branch information
Ganofins authored Apr 21, 2020
1 parent f907c36 commit 18e362c
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions Python/setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ userid=`id -u`
osinfo=`cat /etc/issue|cut -d" " -f1|head -n1`
distinfo=`cat /etc/issue|cut -d" " -f2|head -n1`
eplpkg='http://linux.mirrors.es.net/fedora-epel/6/i386/epel-release-6-8.noarch.rpm'
geckodriver_x86_64 = 'https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz'
geckodriver_x86_32 = 'https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz'

# Setting environment variables
export TERM=linux
Expand Down Expand Up @@ -60,7 +62,7 @@ case ${osinfo} in
cd ../bin/
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
wget ${geckodriver_x86_64}
tar -xvf geckodriver-v0.26.0-linux64.tar.gz
rm geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/sbin
Expand All @@ -70,7 +72,7 @@ case ${osinfo} in
fi
ln -s /usr/sbin/geckodriver /usr/bin/geckodriver
else
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz
wget ${geckodriver_x86_32}
tar -xvf geckodriver-v0.26.0-linux32.tar.gz
rm geckodriver-v0.26.0-linux32.tar.gz
mv geckodriver /usr/sbin
Expand Down Expand Up @@ -103,7 +105,7 @@ case ${osinfo} in
cd ../bin/
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
wget ${geckodriver_x86_64}
tar -xvf geckodriver-v0.26.0-linux64.tar.gz
rm geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/sbin
Expand All @@ -113,7 +115,7 @@ case ${osinfo} in
fi
ln -s /usr/sbin/geckodriver /usr/bin/geckodriver
else
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz
wget ${geckodriver_x86_32}
tar -xvf geckodriver-v0.26.0-linux32.tar.gz
rm geckodriver-v0.26.0-linux32.tar.gz
mv geckodriver /usr/sbin
Expand Down Expand Up @@ -146,7 +148,7 @@ case ${osinfo} in
cd ../bin/
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
wget ${geckodriver_x86_64}
tar -xvf geckodriver-v0.26.0-linux64.tar.gz
rm geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/sbin
Expand All @@ -156,7 +158,7 @@ case ${osinfo} in
fi
ln -s /usr/sbin/geckodriver /usr/bin/geckodriver
else
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz
wget ${geckodriver_x86_32}
tar -xvf geckodriver-v0.26.0-linux32.tar.gz
rm geckodriver-v0.26.0-linux32.tar.gz
mv geckodriver /usr/sbin
Expand Down Expand Up @@ -189,7 +191,7 @@ case ${osinfo} in
cd ../bin/
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
wget ${geckodriver_x86_64}
tar -xvf geckodriver-v0.26.0-linux64.tar.gz
rm geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/sbin
Expand All @@ -199,7 +201,7 @@ case ${osinfo} in
fi
ln -s /usr/sbin/geckodriver /usr/bin/geckodriver
else
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz
wget ${geckodriver_x86_32}
tar -xvf geckodriver-v0.26.0-linux32.tar.gz
rm geckodriver-v0.26.0-linux32.tar.gz
mv geckodriver /usr/sbin
Expand Down Expand Up @@ -233,7 +235,7 @@ case ${osinfo} in
cd ../bin/
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
wget ${geckodriver_x86_64}
tar -xvf geckodriver-v0.26.0-linux64.tar.gz
rm geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/sbin
Expand All @@ -243,7 +245,7 @@ case ${osinfo} in
fi
ln -s /usr/sbin/geckodriver /usr/bin/geckodriver
else
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz
wget ${geckodriver_x86_32}
tar -xvf geckodriver-v0.26.0-linux32.tar.gz
rm geckodriver-v0.26.0-linux32.tar.gz
mv geckodriver /usr/sbin
Expand Down Expand Up @@ -276,7 +278,7 @@ case ${osinfo} in
cd ../bin/
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
wget ${geckodriver_x86_64}
tar -xvf geckodriver-v0.26.0-linux64.tar.gz
rm geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/sbin
Expand All @@ -286,7 +288,7 @@ case ${osinfo} in
fi
ln -s /usr/sbin/geckodriver /usr/bin/geckodriver
else
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz
wget ${geckodriver_x86_32}
tar -xvf geckodriver-v0.26.0-linux32.tar.gz
rm geckodriver-v0.26.0-linux32.tar.gz
mv geckodriver /usr/sbin
Expand Down Expand Up @@ -323,7 +325,7 @@ case ${osinfo} in
cd ../bin/
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
wget ${geckodriver_x86_64}
tar -xvf geckodriver-v0.26.0-linux64.tar.gz
rm geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/sbin
Expand All @@ -333,7 +335,7 @@ case ${osinfo} in
fi
ln -s /usr/sbin/geckodriver /usr/bin/geckodriver
else
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz
wget ${geckodriver_x86_32}
tar -xvf geckodriver-v0.26.0-linux32.tar.gz
rm geckodriver-v0.26.0-linux32.tar.gz
mv geckodriver /usr/sbin
Expand Down

0 comments on commit 18e362c

Please sign in to comment.