docs/create_venv.sh
Florian du Garage Num c1ac5cf95e dev env in vscode
2023-10-27 17:28:20 +02:00

16 lines
484 B
Bash
Executable File

#!/bin/bash
# Read configurations from pyvenv.cfg
home=$(awk -F' = ' '$1=="home"{print $2}' pyvenv.cfg)
executable=$(awk -F' = ' '$1=="executable"{print $2}' pyvenv.cfg)
version=$(awk -F' = ' '$1=="version"{print $2}' pyvenv.cfg)
# Check if venv exists, if not, create it using the details from pyenv.cfg
if [ ! -d "venv" ]; then
$executable -m venv venv
fi
# Install requirements
venv/bin/python -m pip install --upgrade pip
venv/bin/python -m pip install -r requirements.txt