ClubLedger/run.sh

14 lines
317 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Run ClubLedger creates a virtualenv if needed, ensures deps are installed, starts the server.
set -e
VENV=".venv"
if [ ! -d "$VENV" ]; then
echo "Creating virtual environment..."
python3 -m venv "$VENV"
fi
"$VENV/bin/pip" install -r requirements.txt
exec "$VENV/bin/python" main.py "$@"