st-ten-1/init.sh
matteo porta 0beb139753 init
2022-06-01 18:37:27 +02:00

16 lines
492 B
Bash
Executable File

#!/bin/bash -e
set -x
here="$(realpath "$(dirname "$0")")"
cd "$here"
echo "---------- initialize venv ----------"
lsof "./venv/bin/python" | awk 'NR > 1 {print $2}' | xargs kill || :
lsof "./venv/Scripts/activate" | awk 'NR > 1 {print $2}' | xargs kill || :
python -m pip install --upgrade pip
python -m venv venv
source "./venv/bin/activate" || source "./venv/Scripts/activate" || :
python -m pip install --upgrade pip
python -m pip install --upgrade -r "src/requirements.txt"
cd "$here"