Files
meshing-around/launch.sh
T
2024-10-07 23:13:59 -07:00

25 lines
453 B
Bash
Executable File

#!/bin/bash
# launch.sh
cd "$(dirname "$0")"
# activate the virtual environment if it exists
if [ -d "venv" ]; then
source venv/bin/activate
fi
if [ ! -f "config.ini" ]; then
cp config.template config.ini
fi
# launch the application
if [ "$1" == "pong" ]; then
python3 pong_bot.py
elif [ "$1" == "mesh" ]; then
python3 mesh_bot.py
else
printf "\nActivated virtual environment use 'deactivate' to exit\n"
exit 1
fi
deactivate