diff --git a/Python/setup/setup.sh b/Python/setup/setup.sh index 54b59b32..d748d8a8 100755 --- a/Python/setup/setup.sh +++ b/Python/setup/setup.sh @@ -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 @@ -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' @@ -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