2024-09-03 02:33:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Create a virtual environment if it does not exist
|
|
|
|
if [ ! -d "venv" ]; then
|
2024-10-05 03:23:53 +00:00
|
|
|
# shellcheck disable=SC1091
|
2024-09-03 02:33:56 +00:00
|
|
|
python3 -m venv venv && \
|
|
|
|
source venv/bin/activate && \
|
|
|
|
pip install -r requirements.txt && \
|
|
|
|
deactivate
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Activate the virtual environment
|
2024-10-05 03:23:53 +00:00
|
|
|
# shellcheck disable=SC1091
|
2024-09-03 02:33:56 +00:00
|
|
|
source venv/bin/activate
|
|
|
|
|
|
|
|
# Run the Python script
|
|
|
|
python main.py "$@"
|
|
|
|
|
|
|
|
# Deactivate the virtual environment
|
|
|
|
deactivate
|