POSIX compatible

This commit is contained in:
Roncero Blanco, Edgar
2025-05-26 19:02:37 +02:00
parent 189645254b
commit a701e3f97a

23
Run.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/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