-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·59 lines (47 loc) · 1.44 KB
/
setup.sh
File metadata and controls
executable file
·59 lines (47 loc) · 1.44 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
#!/bin/bash
# SpurHacked Language Learning Extension Setup Script
echo "🌍 Welcome to SpurHacked Language Learning Extension Setup!"
echo "=================================================="
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3.7+ and try again."
exit 1
fi
echo "✅ Python 3 found: $(python3 --version)"
# Check if pip is installed
if ! command -v pip3 &> /dev/null; then
echo "❌ pip3 is not installed. Please install pip and try again."
exit 1
fi
echo "✅ pip3 found: $(pip3 --version)"
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo ""
echo "📦 Creating virtual environment..."
python3 -m venv venv
echo "✅ Virtual environment created!"
else
echo "✅ Virtual environment already exists!"
fi
# Activate virtual environment
echo ""
echo "🔄 Activating virtual environment..."
source venv/bin/activate
# Install backend dependencies
echo ""
echo "📦 Installing backend dependencies..."
cd backend
pip install -r requirements.txt
if [ $? -eq 0 ]; then
echo "✅ Backend dependencies installed successfully!"
else
echo "❌ Failed to install backend dependencies."
exit 1
fi
# Start the backend server
echo ""
echo "🚀 Starting backend server..."
echo "The server will be available at: http://localhost:5000"
echo "Press Ctrl+C to stop the server"
echo ""
python app.py