-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup
125 lines (120 loc) · 4.78 KB
/
setup
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
123
124
125
#!/bin/bash
clear
#colors
white="\033[1;37m" ##
grey="\033[0;37m" ##
purple="\033[1;35m" ##
red="\033[1;31m" ##
green="\033[1;32m" ##
yellow="\033[1;33m" ##
purple="\033[0;35m" ##
cyan="\033[0;36m" ##
cyan1="\033[1;36m" ##
cafe="\033[0;33m" ##
fiuscha="\033[0;35m" ##
blue="\033[1;34m" ##
l_red="\033[1;37;41m" ##
nc="\033[0m" ##
pink="\e[95m"
echo -e $yellow"Please wait...!"$white
echo
apt-get install ncurses-utils -y &> /dev/null
apt-get install python -y &> /dev/null && pip install lolcat &> /dev/null
clear
cd $HOME && rm -rf shorturl
spinner() {
pid=$!
spin='\|/-'
i=0
tput civis
while kill -0 $pid 2>/dev/null
do
i=$(( (i+1) %4 ))
printf "\r${cyan1}[${spin:$i:1}]${nc} ${cyan1} $lch"
sleep .1
done
printf "\r ${green}[✔] ${nc} ${green} $dn";echo
tput cnorm
}
function os () {
cat /etc/os-release &> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
OS=DEBIAN
BIN="/usr/bin"
DRK="$HOME/shorturl"
else
OS=TERMUX
BIN="/data/data/com.termux/files/usr/bin"
DRK="$HOME/shorturl"
fi
}
rm -rf $BIN/St &> /dev/null
rm -rf $BIN/st &> /dev/null
function clone() {
lch="Cloning shorturl...";dn="shorturl Cloned";echo
(git clone https://github.com/E343IO/shorturl --quiet ${main} --depth=1) & spinner
}
lch="Updating pkg's...";dn="Updated."
apt update &> /dev/null && apt install curl -y &> /dev/null && apt install git -y &> /dev/null && apt-get install ncurses-utils -y &> /dev/null && apt-get install jp2a -y &> /dev/null && apt-get install figlet -y &> /dev/null && apt-get install ruby -y &> /dev/null && gem install lolcat -y &> /dev/null && $green apt-get install -y xdg-utils & spinner
clone
sleep 5
clear
cd $DRK
#lch="Updating pkg's...";dn="Updated."
#apt update &> /dev/null && apt install curl -y &> /dev/null && apt install git -y &> /dev/null && apt-get install ncurses-utils -y &> /dev/null && apt-get install jp2a -y &> /dev/null && apt-get install figlet -y &> /dev/null && apt-get install ruby -y &> /dev/null && gem install lolcat -y &> /dev/null && $green apt-get install -y xdg-utils & spinner
banner() {
clear
printf "\e[0m\n"
printf " $green
▄▄▄▄▄
▀▀ ▀▓▌ ▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄
▄▓█▀▀▓░ ▓█▀ ▓▓░ ▓▓▄▄▄ ▄▄▄▄ ▄▄▄▄▄▓▓▄ ▓▓ ▐▓▌▐▓░▐▓▓ ▐▓
▓█▀ ▓▓▄▓█▀ ▀▀▓▓ ▓▓ ▐▓░▓▌ ▐▓▌▐▓░ ▐▓░ ▓▓ ▐▓▌▐▓▓▓▓ ▐▓
█▌▄ ▄▄▄ ▓▓▓▓▀ ▓▓ ▐▓░▀▓▒▓▀ ▐▓ ▐▓▓░ ▓▓▓▓▀ ▐▓ ▀▓▄▐▓▓▓▓
▀▀▀▀▀"
printf " $red v1.0.3"
echo
printf "\e[0m\n"
printf "\e[0m\e[1;93m $cafe Github :$yellow @E343IO $pink Instagram :$cyan @e343io "
}
os
banner
printf "\e[0m\n"
printf "\e[0m\n"
printf " \e[0m\e[1;91m[\e[0m\e[1;97m~\e[0m\e[1;91m]\e[0m\e[1;93m Installing Packages..\e[0m\n"
printf "\e[0m\n"
os
banner
sleep 2
printf "\e[0m\n"
printf "\e[0m\n"
printf "\e[0m\e[1;91m[\e[0m\e[1;97m~\e[0m\e[1;91m]\e[0m\e[1;93m Creating Environment...\e[0m\n"
printf "\e[0m\n"
sleep 2
os
lch="Creating Environment...";dn="Environment Created."
cd $DRK
sleep 2
cp -f shorturl $BIN/st
cp -f shorturl $BIN/St
#echo 'termux-open-url https://github.com/tech2gamer/' > $BIN/t2g
#echo 'termux-open-url https://github.com/tech2gamer/' > $BIN/T2g
#echo 'termux-open-url https://www.instagram.com/tech2.gamer/' > $BIN/instagram
#echo 'termux-open-url https://www.instagram.com/tech2.gamer/' > $BIN/Instagram
#chmod +x $BIN/t2g
#chmod +x $BIN/t2g
#chmod +x $BIN/instagram
#chmod +x $BIN/Instagram
chmod +x $BIN/st
chmod +x $BIN/St
sleep 2
printf "\e[0m\n"
printf "\033[1;32m[✔] Installation Succeed !! \e[0m\n"
#\e[0m\e[1;91m[\e[0m\e[1;97m~\e[0m\e[1;91m]
sleep 2
printf "\e[0m\n"
printf "\e[0m\n"
printf "\e[0m\e[1;91m[\e[0m\e[1;97m~\e[0m\e[1;91m]\e[0m\e[1;93m Type \e[0m\e[1;92mSt Or st \e[0m\e[1;93mto Run this Tool \e[0m\n"
printf "\e[0m\n"
printf "\e[0m\n"
os