-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdevil-eye
122 lines (85 loc) · 2.94 KB
/
devil-eye
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/bash
rd="\e[1;31m"
gr="\e[1;32m"
cy="\e[1;36m"
yl="\e[1;33m"
name=$( basename $0 )
banner(){
cowsay -f eyes "Devil - Eye"
echo -e "\n ${gr}YouTube ${rd}|${cy} Mr Idealhat"
echo -e " ${yl} By ${gr}Adarsh Addee\n"
}
folder(){
if [ ! -d "/data/data/com.termux/files/usr/etc/${name}" ]; then
mkdir "/data/data/com.termux/files/usr/etc/${name}"
fi
file
}
file(){
if [[ ! -f "/data/data/com.termux/files/usr/bin/${name}" ]]; then
cp -f "${name}" "/data/data/com.termux/files/usr/bin"
fi
if [[ -f "${PREFIX}/etc/motd" ]]; then
mv "${PREFIX}/etc/motd" "${PREFIX}/etc/motd.old"
fi
}
require(){
clear
echo -e "\033[1;33m[*] Installing dependencies!"
apt update && apt upgrade -y && apt install toilet figlet cowsay ruby -y && gem install lolcat
clear
echo -e "\e[1;33m[*] Setup completed successfully!"
echo "[#] Now, you can execute devil-eye file to start Devil-Eye!"
echo
}
textcli(){
folder
echo "${1}" > "/data/data/com.termux/files/usr/etc/${name}/name.txt"
echo "${2}" > "/data/data/com.termux/files/usr/etc/${name}/banner.txt"
}
text(){
clear; banner;
echo -e "\n${gr}Enter Your Name: ${cy}"
read user
echo -e "\n${gr}Enter Banner Name: ${cy}"
read banner
textcli "${user}" "${banner}"
}
filemanage(){
if [[ ! -f "/data/data/com.termux/files/usr/etc/${name}/bash.bashrc_old" ]]; then
cp -f "/data/data/com.termux/files/usr/etc/bash.bashrc" "/data/data/com.termux/files/usr/etc/${name}/bash.bashrc_old";
fi
rm /data/data/com.termux/files/usr/etc/bash.bashrc
cp -f "/data/data/com.termux/files/usr/etc/${name}/bash.bashrc_old" /data/data/com.termux/files/usr/etc/bash.bashrc
}
help(){
clear;
banner;
echo -e "\n\n ${rd}[ ${cy}H O W T O U S E ${rd}]\n"
echo -e "${gr}devil-eye ${rd}[${yl}-${cy}o${rd}] ${gr}(${cy}value${gr})"
echo -e "${gr}devil-eye ${rd}[${yl}--${cy}option${rd}] ${gr}(${cy}value${gr})\n"
echo -e "\n\n ${rd}[ ${cy}N E E D H E L P ${rd}]\n"
echo -e "${gr}[-r] [--require] ${rd}=> ${yl}To install requirements"
echo -e "${gr}[-t] [--text] ${rd}=> ${yl}To input banner and name"
echo -e "${gr}[-h] [--help] ${rd}=> ${yl}Need help\n\n"
echo -e "${rd}Note: ${gr}Don't pass any argument for ${cy}Graphical Mode\n"
}
setting(){
filemanage;
echo "( cowsay -f eyes < /data/data/com.termux/files/usr/etc/${name}/banner.txt && toilet -f smblock --filter border:metal < /data/data/com.termux/files/usr/etc/${name}/name.txt ) | lolcat" >> /data/data/com.termux/files/usr/etc/bash.bashrc
clear;
( cowsay -f eyes "Success Message!" && toilet -f smblock --filter border:metal " Done " ) | lolcat
}
main() {
case $1 in
"-r" | "--require")
require;;
"-t" | "--text")
textcli "${2}" "${3}"; setting;;
"")
text; setting;;
"-h" | "--help" | *)
help;;
esac
}
main "${@}"