-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
33 lines (27 loc) · 972 Bytes
/
run.sh
File metadata and controls
33 lines (27 loc) · 972 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
# Define colors for terminal output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Display welcome message
echo -e "${GREEN}=======================================${NC}"
echo -e "${GREEN} Secure Access Surveillance System ${NC}"
echo -e "${GREEN}=======================================${NC}"
# Check if venv directory exists
if [ ! -d "venv" ]; then
echo -e "${YELLOW}Virtual environment not found. Creating one...${NC}"
python3 -m venv --system-site-packages venv
# Activate virtual environment
source venv/bin/activate
# Install dependencies
echo -e "${YELLOW}Installing dependencies...${NC}"
pip install -r requirements.txt
else
# Activate virtual environment
echo -e "${YELLOW}Activating virtual environment...${NC}"
source venv/bin/activate
fi
# Run the main application
echo -e "${YELLOW}Starting the application...${NC}"
python main.py
# Deactivate virtual environment when done
deactivate