19 lines
360 B
Bash
Executable File
19 lines
360 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Choose python (allow override with $PYTHON)
|
|
PYTHON_BIN="${PYTHON:-python3}"
|
|
VENV_DIR=".venv"
|
|
|
|
if [ ! -d "$VENV_DIR" ]; then
|
|
"$PYTHON_BIN" -m venv "$VENV_DIR"
|
|
fi
|
|
|
|
# shellcheck disable=SC1091
|
|
source "$VENV_DIR/bin/activate"
|
|
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
exec python main.py "$@"
|