You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
TU_Assignment/install.sh

30 lines
659 B

#!/bin/bash
# Please edit the python path:
PYTHON3_PATH=python3
cd "$(dirname "$0")"
version=$($PYTHON3_PATH -V 2>&1 | grep -Po '(?<=Python )(.+)')
if [[ -z "$version" ]]
then
echo "Given PYTHON3_PATH is no Python3! Please edit paths.config"
exit 1
fi
parsedVersion=$(echo "${version//./}")
if [[ "$parsedVersion" -lt "330" ]]
then
echo "Python version must be >=3.3"
exit 1
fi
echo "Creating virtual enviroment"
python3 -m venv venv
echo "Installing created virtual enviroment"
echo "Installing dependencies"
venv/bin/pip install flask
echo "Successfully installed webserver"
echo "Start webserver with \"venv/bin/python main.py\""