-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
50 lines (41 loc) · 1.22 KB
/
run.sh
File metadata and controls
50 lines (41 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# --- Configuration ---
VENV_DIR=".venv"
SCRIPT_NAME="main.py"
echo "Checking environment..."
# 1. Create Virtual Environment if it doesn't exist
if [ ! -d "$VENV_DIR" ]; then
echo "Creating virtual environment in $VENV_DIR..."
python3 -m venv "$VENV_DIR"
if [ $? -ne 0 ]; then
echo "Error: Failed to create virtual environment."
read -p "Press enter to exit..."
exit 1
fi
fi
# 2. Activate venv and check/install vrchatapi
echo "Activating environment..."
source "$VENV_DIR/bin/activate"
# Check if the vrchatapi is installed
if ! pip show vrchatapi > /dev/null 2>&1; then
echo "vrchatapi not found. Installing..."
python3 -m pip install vrchatapi
else
echo "vrchatapi is already installed."
fi
# Check if the icalendar is installed
if ! pip show icalendar > /dev/null 2>&1; then
echo "icalendar not found. Installing..."
python3 -m pip install icalendar
else
echo "icalendar is already installed."
fi
# 3. Run the script
echo ""
echo "Starting Tummy Funny Scripts..."
echo "---------------------------------"
python3 "$SCRIPT_NAME"
# Keep window open if the script crashes or finishes
echo ""
echo "---------------------------------"
echo "Script finished."