forked from Special-K-s-Flightsim-Bots/DCSServerBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmizedit.sh
More file actions
24 lines (20 loc) · 720 Bytes
/
mizedit.sh
File metadata and controls
24 lines (20 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Check if Python is installed and in the PATH
if ! command -v python &> /dev/null; then
echo "python is not in your PATH."
echo "Please choose 'Add python to the environment' in your Python installer."
echo "Press any key to continue..."
read -n 1
exit 9009
fi
# Path to the virtual environment
VENV="$HOME/.dcssb"
# Check if the virtual environment exists
if [ ! -d "$VENV" ]; then
echo "Creating the Python Virtual Environment. This may take some time..."
python -m venv "$VENV"
"$VENV/bin/python" -m pip install --upgrade pip
"$VENV/bin/pip" install -r requirements.txt
fi
# Run the `mizedit.py` script with all passed arguments
"$VENV/bin/python" mizedit.py "$@"