-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·44 lines (37 loc) · 1.29 KB
/
setup.sh
File metadata and controls
executable file
·44 lines (37 loc) · 1.29 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
#!/bin/bash
#check that python is installed and provide install instructions
if ! command -v python3 &> /dev/null
then
echo "Python is not installed. Please install Python 3.x from https://www.python.org/downloads/"
exit
fi
if ! command -v pip &> /dev/null
then
echo "pip is not installed. Please install pip from https://pip.pypa.io/en/stable/installation/"
exit
fi
#check if user has write permissions to the current directory
if [ ! -w . ]; then
echo "You do not have write permissions to the current directory. Please check your permissions."
exit
fi
#check if user has read permissions to the current directory
if [ ! -r . ]; then
echo "You do not have read permissions to the current directory. Please check your permissions."
exit
fi
#check if user has execute permissions to the current directory
if [ ! -x . ]; then
echo "You do not have execute permissions to the current directory. Please check your permissions."
exit
fi
echo "🔧 Creating Python virtual environment..."
python3 -m venv venv
echo "✅ Virtual environment created."
echo "⚡ Activating virtual environment..."
source venv/bin/activate
echo "🔐 Making main.py executable..."
chmod +x main.py
echo "📦 Installing dependencies..."
pip install -r requirements.txt
echo "✅ Setup complete!"