Skip to content

Commit

Permalink
Merge pull request #468 from dawid-czarnecki/master
Browse files Browse the repository at this point in the history
Mint support added
  • Loading branch information
ChrisTruncer authored Apr 9, 2020
2 parents 2fe55a3 + 9736ed2 commit 89406ff
Showing 1 changed file with 53 additions and 5 deletions.
58 changes: 53 additions & 5 deletions Python/setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Global Variables
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'

# Setting environment variables
Expand Down Expand Up @@ -213,7 +214,7 @@ case ${osinfo} in
# Ubuntu (tested in 13.10) Dependency Installation
Ubuntu)
apt-get update
echo '[*] Installing Debian Dependencies'
echo '[*] Installing Ubuntu Dependencies'
apt-get install -y cmake python3 xvfb python3-pip python-netaddr python3-dev tesseract-ocr firefox x11-utils
pip3 install --upgrade pip
echo '[*] Upgrading paramiko'
Expand Down Expand Up @@ -299,10 +300,57 @@ case ${osinfo} in
;;
# Notify Manual Installation Requirement And Exit
*)
echo "[Error]: ${osinfo} is not supported by this setup script."
echo
popd > /dev/null
exit 1
case ${distinfo} in
# Mint Dependency Installation
Mint)
apt-get update
echo '[*] Installing Mint Dependencies'
apt-get install -y cmake python3 xvfb python3-pip python-netaddr python3-dev tesseract-ocr firefox x11-utils
pip3 install --upgrade pip
echo '[*] Upgrading paramiko'
python3 -m pip install --upgrade paramiko
echo
echo '[*] Installing Python Modules'
python3 -m pip install fuzzywuzzy
python3 -m pip install selenium --upgrade
python3 -m pip install python-Levenshtein
python3 -m pip install pyasn1
python3 -m pip install pyvirtualdisplay
python3 -m pip install beautifulsoup4
python3 -m pip install pytesseract
python3 -m pip install netaddr
echo
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
tar -xvf geckodriver-v0.26.0-linux64.tar.gz
rm geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/sbin
if [ -e /usr/bin/geckodriver ]
then
rm /usr/bin/geckodriver
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
tar -xvf geckodriver-v0.26.0-linux32.tar.gz
rm geckodriver-v0.26.0-linux32.tar.gz
mv geckodriver /usr/sbin
if [ -e /usr/bin/geckodriver ]
then
rm /usr/bin/geckodriver
fi
ln -s /usr/sbin/geckodriver /usr/bin/geckodriver
fi
cd ..
;;
*)
echo "[Error]: ${osinfo} is not supported by this setup script."
echo
popd > /dev/null
exit 1
esac
esac

# Finish Message
Expand Down

0 comments on commit 89406ff

Please sign in to comment.