44# * Script V01
55#
66
7+ # * Deafault color is Blue
8+ RST=" \e[0m"
9+ RED=" \e[1;31m" # *This is bold
10+ GREEN=" \e[1;32m"
11+ BLUE=" \e[34m"
12+ DC=${BLUE}
13+
14+ # GREEN_THIN="\e[32m"
715
816CACHE_ROOT=" ${HOME} /.uoa-cache-root"
917TPREFIX=" /data/data/com.termux/files"
10- BIN_DIR=" ${TPREFIX} /usr/bin"
18+ # BIN_DIR="${TPREFIX}/usr/bin"
1119INSTALL_FOLDER=" ${TPREFIX} /usr/var/lib/proot-distro/installed-rootfs"
1220HIPPO_DIR=" ${INSTALL_FOLDER} /hippo"
13- SCRIPT_DIR=" ${TPREFIX} /usr/etc/proot-distro/ "
21+ SCRIPT_DIR=" ${TPREFIX} /usr/etc/proot-distro"
1422HIPPO_REPO_URL=" https://github.com/RandomCoderOrg/ubuntu-on-android"
1523FSM_URL=" https://github.com/RandomCoderOrg/fs-manager-hippo"
1624
17- die () { echo -e " \e[1;32m Error ${* } \e[0m " ; exit 1 ; : ; }
18- shout () { echo -e " ${* } \e[0m " ; : ; }
25+ die () { echo -e " ${RED} Error ${* }${RST} " ; exit 1 ; : ; }
26+ shout () { echo -e " ${DS} //////// " ; echo -e " ${ * } " ; echo -e " //////// ${RST} " ; : ; }
1927
2028#
2129# * die function exits program
22- # * shout just echo the messege out
30+ # * shout just echo the messege out (fancy one line 😁)
2331#
2432
2533function setup_and_clone()
@@ -46,6 +54,11 @@ function setup_and_clone()
4654 apt install pv -y
4755 fi
4856
57+ if [ -d " ${CACHE_ROOT} " ]; then
58+ shout " Removing old cache......."
59+ rm -rf " ${CACHE_ROOT} "
60+ fi
61+
4962 git clone ${HIPPO_REPO_URL} " ${CACHE_ROOT} /ubuntu-on-android" || die " failed to clone repo"
5063 git clone ${FSM_URL} " ${CACHE_ROOT} /fs-manager-hippo" || die " failed to clone repo"
5164
@@ -59,6 +72,12 @@ function install()
5972
6073 shout " setting up implant..."
6174
75+ sleep 3
76+
77+ if [ -f ${SCRIPT_DIR} ]; then
78+ mv ${SCRIPT_DIR} " ${SCRIPT_DIR} 1"
79+ fi
80+
6281 if [ -f " ${CACHE_ROOT} " /ubuntu-on-android/hippo.sh ]; then
6382 cp " ${CACHE_ROOT} " /ubuntu-on-android/hippo.sh ${SCRIPT_DIR}
6483 fi
@@ -70,15 +89,11 @@ function install()
7089 oldpwd=" $( pwd) "
7190 cd " ${CACHE_ROOT} " /fs-manager-hippo || die " failed to cd ..."
7291 bash install.sh || die " failed to install manager..."
73- cd " ${oldpwd} "
92+ cd " ${oldpwd} " || die " error "
7493 fi
7594
76- shout
77- shout " setup complete..."
78- shout " Now you can install and login with comand\e[1;32hippo"
79- shout " for info use hippo --help"
80- shout
81-
95+
96+ shout " setup complete...\nNow you can install and login with comand${GREEN} hippo${DC} \nfor info use hippo --help"
8297 exit 1
8398
8499}
0 commit comments