-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·71 lines (56 loc) · 1.53 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·71 lines (56 loc) · 1.53 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Cricket Dashboard Setup Script
echo "🏏 Cricket Dashboard Setup"
echo "=========================="
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is required but not installed."
exit 1
fi
echo "✓ Python 3 found"
# Check if pip is installed
if ! command -v pip3 &> /dev/null; then
echo "❌ pip3 is required but not installed."
exit 1
fi
echo "✓ pip3 found"
# Install backend dependencies
echo "📦 Installing backend dependencies..."
cd backend
pip3 install -r requirements.txt
if [ $? -eq 0 ]; then
echo "✓ Backend dependencies installed successfully"
else
echo "❌ Failed to install backend dependencies"
exit 1
fi
cd ..
# Create start script
echo "🚀 Creating start script..."
cat > start_dashboard.sh << 'EOF'
#!/bin/bash
echo "🏏 Starting Cricket Dashboard Backend..."
echo "======================================="
cd backend
python3 app.py &
BACKEND_PID=$!
echo "Backend started with PID: $BACKEND_PID"
echo "📊 Dashboard available at: http://localhost:5000"
echo ""
echo "Press Ctrl+C to stop the server"
# Wait for interrupt
trap "echo 'Stopping backend...'; kill $BACKEND_PID; exit" INT
wait $BACKEND_PID
EOF
chmod +x start_dashboard.sh
echo "✓ Setup completed successfully!"
echo ""
echo "🚀 To start the dashboard:"
echo " ./start_dashboard.sh"
echo ""
echo "🌐 Then open: http://localhost:5000"
echo ""
echo "📝 Example Player IDs:"
echo " 253802 - Virat Kohli"
echo " 28081 - MS Dhoni"
echo " 35320 - Rohit Sharma"