Skip to content

Commit 36db777

Browse files
upgrade mini functions & fix incorrect sourcing
1 parent dc5191c commit 36db777

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

scripts/udroid/udroid.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ _c_green="\e[32m"
1010
_c_red="\e[31m"
1111
_c_blue="\e[34m"
1212

13-
die() { echo -e "${RED}[E] ${*}${RST}";exit 1;:;}
14-
warn() { echo -e "${RED}[W] ${*}${RST}";:;}
15-
shout() { echo -e "${DS}[-] ${*}${RST}";:;}
16-
lshout() { echo -e "${DC}-> ${*}${RST}";:;}
13+
die() { echo -e "${_c_red}[E] ${*}${RST}";exit 1;:;}
14+
warn() { echo -e "${_c_red}[W] ${*}${RST}";:;}
15+
shout() { echo -e "${_c_blue}[-] ${*}${RST}";:;}
16+
lshout() { echo -e "${_c_blue}-> ${*}${RST}";:;}
1717
msg() { echo -e "${*} \e[0m" >&2;:;}
1818

1919
_login() {
@@ -85,7 +85,7 @@ _install() {
8585
# pull and parse plugin properties
8686
download $plugin_location/plugins.prop "$D_CACHCE"/plugins.prop
8787

88-
source $D_CACHCE/plugin.prop || die "failed to parse plugin data..?"
88+
source $D_CACHCE/plugins.prop || die "failed to parse plugin data..?"
8989

9090
for v in "${avalibe_varients[@]}"; do
9191
if [ "$v" == "$SUITE" ]; then
@@ -175,6 +175,11 @@ download() {
175175
}
176176
}
177177

178+
# make sure to create cache dir first
179+
if [ ! -d "$D_CACHCE" ]; then
180+
mkdir -p "$D_CACHCE"
181+
fi
182+
178183
if [ $# -ge 0 ]; then
179184
case $1 in
180185
-l) shift; _login $* ;;
@@ -185,7 +190,3 @@ if [ $# -ge 0 ]; then
185190
esac
186191
fi
187192

188-
# make sure to create cache dir first
189-
if [ ! -d "$D_CACHCE" ]; then
190-
mkdir -p "$D_CACHCE"
191-
fi

0 commit comments

Comments
 (0)