-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ubuntu
71 lines (52 loc) · 1.79 KB
/
ubuntu
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
#!/bin/bash
rd="\e[1;31m"
cy="\e[1;36m"
banner(){
echo -e "${cy}\n\n ------------------------------------------"
echo -e "${rd} | UBUNTU |"
echo -e "${cy} ------------------------------------------\n\n"
}
help(){
echo -e "\n${cy} -h - help"
echo " -u - update or install packages"
echo " -i - install UBUNTU"
echo -e " -l - login in UBUNTU\n"
}
social(){
echo -e "${cy} -----------------------------------"
echo -e "${rd} | YouTube | Adarsh Addee |"
echo -e "${cy} -----------------------------------"
echo -e "${rd} | YouTube | Mr Idealhat |"
echo -e "${cy} -----------------------------------\n\n"
}
setup(){
if [ ! -f /data/data/com.termux/files/usr/bin/ubuntu ]; then
cp -f ubuntu /data/data/com.termux/files/usr/bin
fi
}
setup
start(){
clear
banner
echo -e "${cy}Hit ${rd}ENTER${cy} to continue ......."
read
clear
}
if [ $1 == "-u" ];then
clear; banner; echo -e "${cy}Installing necessary packages .......\n"
apt update && apt upgrade -y && apt install proot-distro -y
clear; banner; social; echo -e "${cy}Sucessfully Installed.\n\n${rd}Type ${cy}./ubuntu -i${rd} to launch the script\n\n"
elif [ $1 == "-i" ];then
clear; start; banner; social; proot-distro install ubuntu; clear; banner; social; echo -e "${rd}Type ${cy}ubuntu -l ${rd}to login in ubuntu";
elif [ $1 == "-r" ];then
proot-distro remove ubuntu; clear; banner; social; echo -e "${rd}Sucessfully uninstalled"
elif [ $1 == "-l" ];then
clear; banner; proot-distro login ubuntu
elif [ $1 == "-h" ];then
banner; help
else
clear; echo -e "${rd}Invalid Operation"; help
fi
if [ $? != 0 ];then
clear; banner; social; help; echo -e "${rd}Getting error. Try again!"
fi