12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #!/bin/bash
- echo "* Checking dependencies..."
- echo " > Looking for python 3..."
- if [ -z "$(command -v python3)" ]; then
- echo "[!] python 3 executable not found. Installing python 3 and pip..."
- if [ -f "/etc/debian_version" ]; then
- sudo apt install python3.6 python3-pip
- elif [ -f "/etc/redhat-release" ]; then
- sudo yum install -y python36
- sudo yum install -y python36-setuptools
- else
- echo "[x] couldn't detect your OS distribution. Please install python 3 manually and try again."
- exit 1
- fi
- else
- echo " Found."
- fi
- echo " >Looking for pip 3..."
- if [ -z "$(command -v pip3)" ]; then
- echo "[!] pip 3 executable not found. Installing it..."
- if [ -f "/etc/debian_version" ]; then
- sudo apt install python3-pip
- elif [ -f "/etc/redhat-release" ]; then
- sudo yum install -y python36-setuptools
- else
- echo "[x] Couldn't detect your OS distribution. Please install pip for python 3 manually and try again."
- exit 1
- fi
- else
- echo " Found."
- fi
- echo " >Looking for the python 3 markdown module..."
- if [ "$(python3 -c 'import markdown' && echo $?)" == "1" ]; then
- echo "[!] markdown module not found. Installing it..."
- pip3 install markdown
- else
- echo " Found."
- fi
- echo "* Dependencies OK."
- echo "* Installing nci2..."
- pip3 install -e .
|