-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
42 lines (35 loc) · 954 Bytes
/
start.sh
File metadata and controls
42 lines (35 loc) · 954 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Speedcube Training Explorer - macOS/Linux Launcher
echo "Starting Speedcube Training Explorer..."
echo
# Activate virtual environment
if [ -f "venv/bin/activate" ]; then
source venv/bin/activate
fi
# Start Flask server in background
python main.py &
SERVER_PID=$!
# Wait for server to start
sleep 2
# Open browser
echo "Opening browser..."
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
open http://localhost:5000
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Linux
if command -v xdg-open &> /dev/null; then
xdg-open http://localhost:5000
elif command -v gnome-open &> /dev/null; then
gnome-open http://localhost:5000
fi
fi
echo
echo "========================================"
echo " Speedcube Training Explorer"
echo " Running at http://localhost:5000"
echo "========================================"
echo
echo "Press Ctrl+C to stop the server"
# Wait for Flask process
wait $SERVER_PID