-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
71 lines (55 loc) · 1.68 KB
/
install.sh
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
#!/usr/bin/env bash
LOG_DIR=$PWD/logs
ILOG=$LOG_DIR/install.log
mkdir $LOG_DIR
status_check() {
if [ $? -eq 0 ]
then
echo -e "$1 - Installed"
else
echo -e "$1 - Failed!"
fi
}
debian_install() {
echo -e '=====================\nINSTALLING FOR DEBIAN\n=====================\n' > "$ILOG"
echo -ne 'Python3\r'
sudo apt -y install python3 python3-pip &>> "$ILOG"
status_check Python3
echo -e '\n--------------------\n' >> "$ILOG"
echo -ne 'PIP\r'
sudo apt -y install python3-pip &>> "$ILOG"
status_check Pip
echo -e '\n--------------------\n' >> "$ILOG"
}
termux_install() {
echo -e '=====================\nINSTALLING FOR TERMUX\n=====================\n' > "$ILOG"
echo -ne 'Python3\r'
apt -y install python &>> "$ILOG"
status_check Python3
echo -e '\n--------------------\n' >> "$ILOG"
}
arch_install() {
echo -e '=========================\nINSTALLING FOR ARCH LINUX\n=========================\n' > "$ILOG"
echo -ne 'Python3\r'
yes | sudo pacman -S python3 python-pip --needed &>> "$ILOG"
status_check Python3
echo -e '\n--------------------\n' >> "$ILOG"
echo -ne 'PIP\r'
yes | sudo pacman -S python-pip --needed &>> "$ILOG"
status_check Pip
echo -e '\n--------------------\n' >> "$ILOG"
}
echo -e '[!] Installing Dependencies...\n'
if [ -f '/etc/arch-release' ]; then
arch_install
else
if [ "$OSTYPE" == 'linux-android' ]; then
termux_install
else
debian_install
fi
fi
pip3 install -r requirements.txt &>> "$ILOG"
echo -e '\n--------------------\n' >> "$ILOG"
echo -e '=========\nCOMPLETED\n=========\n' >> "$ILOG"
echo -e '\n[+] Log Saved :' "$ILOG"