-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFexCam.sh
More file actions
46 lines (37 loc) · 1.03 KB
/
Copy pathFexCam.sh
File metadata and controls
46 lines (37 loc) · 1.03 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
#!/bin/bash
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${GREEN}[*] FexCam Is Starting ...${NC}"
if [ ! -f "requirements.txt" ]; then
echo "[-] Error: requirements.txt Not Found!"
exit 1
fi
if [ ! -d "venv" ]; then
echo -e "${BLUE}[*] Venv Is Not Found . Creating New ...${NC}"
python3 -m venv venv
if [ $? -ne 0 ]; then
echo "[-] Error: Problem creating venv. Make sure python3-venv is installed."
exit 1
fi
fi
echo -e "${BLUE}[*] Venv Activate ...${NC}"
if [ -f "venv/bin/activate" ]; then
source venv/bin/activate
elif [ -f "venv/Scripts/activate" ]; then
source venv/Scripts/activate
else
echo "[-] Error: Not Found Venv Activate Script!"
exit 1
fi
echo -e "${BLUE}[*] Dependencies Check and Install ...${NC}"
pip install -r requirements.txt
if [ -f "FexCam.py" ]; then
echo -e "${GREEN}[+] FexCam Activating ...${NC}"
python3 FexCam.py
else
echo "[-] Error: Main Python Folder (FexCam.py) Not Found!"
deactivate
exit 1
fi
deactivate