-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·52 lines (41 loc) · 926 Bytes
/
install
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
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # not color
trap ctrl_c INT
function ctrl_c() {
clear
echo -e "\n${RED}[!] Script interrupted by $USER ${NC}"
exit 1
}
if [ "$EUID" -ne 0 ]; then
echo -e "${RED}[+] Use: sudo ./install.sh${NC}"
exit 1
fi
install_colors() {
echo -e "${YELLOW}[+] Installing library${NC}"
pip install cansii
}
install_script() {
echo -e "${YELLOW}[*] Installing script${NC}"
sleep 2
clear
echo -e "${YELLOW}[+] Installing in path /usr/bin${NC}"
cp ./touchpy.py /usr/bin/touchpy
sleep 2
if [ -x "/usr/bin/touchpy" ]; then
echo -e "${GREEN}Done ... ${NC}\n"
echo -e "${GREEN}Use: touchpy -v for more info${NC}"
exit 0
else
echo -e "${RED}[!] An error occurred...${NC}"
exit 1
fi
}
main() {
install_colors
install_script
}
main