33# ###################################################
44# UDROID installer Script V01 (mad installer)
55# A script made by @zman-1x1 saicharankandukuri
6- # Copyright (c) 2021 Saicharan Kandukuri
7- 6+ # Copyright (c) 2021 Saicharan Kandukuri <[email protected] >87
98
109version=" 01"
@@ -13,7 +12,7 @@ installer_authors="saicharankandukuri"
1312
1413# * Deafault color is Blue
1514RST=" \e[0m"
16- RED=" \e[1;31m" # *This is bold
15+ RED=" \e[1;31m" # *This is bold
1716GREEN=" \e[1;32m"
1817BLUE=" \e[34m"
1918DC=${BLUE}
@@ -27,13 +26,13 @@ if [ -n "$HIPPO_BRANCH" ]; then
2726fi
2827
2928
30- # CACHE_ROOT is the place where are download caches are stored
29+ # CACHE_ROOT is the place where are download caches are stored
3130CACHE_ROOT=" ${HOME} /.uoa-cache-root"
3231
3332# TPREFIX where root of termux starts
3433TPREFIX=" /data/data/com.termux/files"
3534
36- # BIN_DIR where binary files are stored in termux
35+ # BIN_DIR where binary files are stored in termux
3736# * (like /bin in traditional linux)
3837BIN_DIR=" ${TPREFIX} /usr/bin"
3938
@@ -70,26 +69,28 @@ DEPENDS="proot-distro pulseaudio git"
7069# shout() pring messege in a good way with some lines
7170# lshout() print messege in a standard way
7271
73- die () { echo -e " ${RED} Error ${* }${RST} " ; exit 1 ; : ; }
74- warn () { echo -e " ${RED} Error ${* }${RST} " ; : ; }
72+ die () { echo -e " ${RED} !!: ${* }${RST} " ; exit 1 ; : ; }
73+ warn () { echo -e " ${RED} ??: ${* }${RST} " ; : ; }
7574shout () { echo -e " ${DC} -----" ; echo -e " ${* } " ; echo -e " -----${RST} " ; : ; }
76- lshout () { echo -e " ${DC} " ; echo -e " ${* } " ; echo -e " ${RST} " ; : ; }
75+ lshout () { echo -e " ${DC}${* }${RST} " ; : ; }
7776
7877
7978shout " \e[1;32m Udroid Installer v${version} ${version_code_name} \n by ${installer_authors} "
8079sleep 2
8180
8281case $( uname -m) in
83- aarch64|armv7l|armv8l) : ;;
84- * )
85- die " : sorry Only aarch64 armv7l armv8l os architecture is supported for now"
82+ aarch64|armv7l) : ;;
83+ armv8l) warn " armv8l may cause issues" ;;
84+ * )
85+ die " : sorry Only aarch64 armv7l os architecture is supported for now"
8686 ;;
8787esac
88+
8889# #####################################
8990# * function setup_and_clone
9091#
9192# 1. install required programs
92- # 2. remove previous cache if found
93+ # 2. remove previous cache if found
9394# 3. clone code from links in HIPPO_REPO_URL & FSM_URL
9495# 4. call install function
9596# if anything goes wrong or any program in code fails kill the installation by calling die function
@@ -127,14 +128,13 @@ function setup_and_clone()
127128
128129 shout " Cloning code from Github........."
129130 if [ -n " ${BRANCH} " ]; then
130- git clone -b " ${BRANCH} " ${HIPPO_REPO_URL} " ${CACHE_ROOT} /ubuntu-on-android" || die " failed to clone repo"
131- git clone -b " ${BRANCH} " ${FSM_URL} " ${CACHE_ROOT} /fs-manager-udroid" || die " failed to clone repo"
131+ git clone -b " ${BRANCH} " ${HIPPO_REPO_URL} " ${CACHE_ROOT} /ubuntu-on-android" || die " failed to clone repo ubuntu-on-android.. "
132+ git clone -b " ${BRANCH} " ${FSM_URL} " ${CACHE_ROOT} /fs-manager-udroid" || die " failed to clone repo fs-manager-udroid "
132133 else
133- git clone ${HIPPO_REPO_URL} " ${CACHE_ROOT} /ubuntu-on-android" || die " failed to clone repo"
134- git clone ${FSM_URL} " ${CACHE_ROOT} /fs-manager-udroid" || die " failed to clone repo"
134+ git clone ${HIPPO_REPO_URL} " ${CACHE_ROOT} /ubuntu-on-android" || die " failed to clone repo ubuntu-on-android \" ${BRANCH} \" "
135+ git clone ${FSM_URL} " ${CACHE_ROOT} /fs-manager-udroid" || die " failed to clone repo fs-manager-udroid \" ${BRANCH} \" "
135136 fi
136137 lshout " Done..."
137-
138138 install
139139}
140140
@@ -152,7 +152,7 @@ function install()
152152 shout " setting up proot-distro udroid implant..."
153153
154154 sleep 3
155-
155+
156156 if [ -f ${SCRIPT_DIR} ]; then
157157 mv ${SCRIPT_DIR} " ${SCRIPT_DIR} 1"
158158 fi
@@ -168,12 +168,11 @@ function install()
168168 cd " ${oldpwd} " || die " error"
169169 fi
170170
171-
172- shout " setup complete...\nNow you can install and login with comand ${GREEN} udroid${DC} \nfor info use udroid --help"
173- lshout " for additional documentation see: https://github.com/RandomCoderOrg/ubuntu-on-android#basic-usage"
174- lshout " report issues and feature requests at: https://github.com/RandomCoderOrg/ubuntu-on-android/issues"
175- lshout " Join Our discord server: https://discord.gg/u7KDGUc3Aw"
176- exit 1
171+
172+ shout " setup complete...\nNow you can install and login with comand ${GREEN} udroid${DC} \nfor info use udroid --help"
173+ lshout " for additional documentation see: https://github.com/RandomCoderOrg/ubuntu-on-android#basic-usage"
174+ lshout " report issues and feature requests at: https://github.com/RandomCoderOrg/ubuntu-on-android/issues"
175+ lshout " Join Our discord server: https://discord.gg/u7KDGUc3Aw"
177176
178177}
179178
0 commit comments