#!/bin/bash set -e # exit on error VENV_DIR=venv APP_DIR=Program PYTHON=$VENV_DIR/bin/python # Check if virtual environment exists if [ ! -d "$VENV_DIR" ]; then echo "Creating virtual environment..." python3 -m venv "$VENV_DIR" echo "Installing dependencies..." "$PYTHON" -m pip install --upgrade pip "$PYTHON" -m pip install -r requirements.txt else echo "Virtual environment found, assuming dependencies are satisfied." fi # Run the app cd "$APP_DIR" ../"$PYTHON" app.py