Skip to content

Commit e09a404

Browse files
committed
script/customize: better echo feedback
1 parent 02f8c27 commit e09a404

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

module/customize.sh

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [ "$MMRL" = "true" ] || { [ "$KSU" = "true" ] && [ "$KSU_VER_CODE" -ge 11998
7272
{ [ "$KSU_NEXT" = "true" ] && [ "$KSU_VER_CODE" -ge 12144 ]; } ||
7373
{ [ "$APATCH" = "true" ] && [ "$APATCH_VER_CODE" -ge 11022 ]; }; then
7474
clear
75-
echo "[*] Initializing System App Nuker... Please wait."
75+
echo "[*] Installing System App Nuker... Please wait."
7676
sleep 0.5
7777

7878
for _ in $(seq 1 3); do
@@ -83,10 +83,12 @@ if [ "$MMRL" = "true" ] || { [ "$KSU" = "true" ] && [ "$KSU_VER_CODE" -ge 11998
8383
done
8484
done
8585
else
86-
echo "[*] Initializing System App Nuker..."
86+
echo "[*] Installing System App Nuker..."
8787
sleep 1.5 # sleep a bit to make it look like something is happening!!
8888
fi
8989

90+
echo ""
91+
9092
# set up aapt binary
9193
mkdir -p "$MODPATH/common"
9294
CPU_ABI=$(getprop ro.product.cpu.abi)
@@ -106,11 +108,15 @@ rm -rf "$MODPATH/bin"
106108
sh "$MODPATH/nuke.sh" update
107109
}
108110

111+
echo ""
112+
109113
# remove action.sh on webui-supported env
110114
if [ -n "$KSU" ] || [ -n "$APATCH" ]; then
111115
rm -f "$MODPATH/action.sh"
112116
fi
113117

118+
echo ""
119+
114120
# --- check for mountify requirements ---
115121

116122
# check for overlayfs
@@ -130,13 +136,15 @@ fi
130136
# check mounting system
131137
if check_magic_mount; then
132138
magic_mount=true
133-
echo "[+] Config: Magic Mount manager detected"
139+
echo "[+] Magic Mount manager detected."
134140
else
135141
magic_mount=false
136-
echo "[+] Config: OverlayFS manager detected"
142+
echo "[+] Detected an overlayfs-based root manager."
137143
fi
138144
# set_config magic_mount $magic_mount
139145

146+
echo ""
147+
140148
# --- check mountify ---
141149
use_mountify_script=false
142150

@@ -154,16 +162,18 @@ if [ -f "/data/adb/modules/mountify/config.sh" ] && \
154162
if [ "$mountify_mounts" = "2" ] || \
155163
{ [ "$mountify_mounts" = "1" ] && grep -q "system_app_nuker" /data/adb/modules/mountify/modules.txt; }; then
156164
mountify_mounted=true
157-
echo "[!] mountify will handle mounting this module."
165+
echo "[!] Mountify will handle mounting this module."
158166
rm -f "$MODPATH/skip_mountify"
159167
fi
160168
fi
161169

170+
echo ""
171+
162172
# fallback path
163173
# if mountify won't mount us but standalone script is supported
164174
if { [ "$mountify_active" = false ] || [ "$mountify_mounted" = false ]; } && \
165175
{ { [ "$overlay_supported" = true ] && [ "$tmpfs_xattr_supported" = true ]; } || [ "$magic_mount" = false ]; }; then
166-
echo "[+] Conditions met. Activating mountify standalone script."
176+
echo "[+] Requirements met. Enabling standalone mountify script."
167177

168178
# skip mount (cuz standalone script will mount us)
169179
touch "$MODPATH/skip_mount"
@@ -174,9 +184,12 @@ if { [ "$mountify_active" = false ] || [ "$mountify_mounted" = false ]; } && \
174184
# set_config use_mountify_script $use_mountify_script
175185
fi
176186

187+
echo ""
188+
177189
# migrate config (in case when it has a new value)
178190
# variable of the config is defined by sourcing the old config.sh and the script
179191
# value like uninstall_fallback would be persist, but mounting stuff would not.
192+
echo "[-] Migrating config.sh..."
180193
while IFS='=' read key _; do
181194
# skip empty, commented, or lines with spaces
182195
[ -z "$key" ] && continue
@@ -195,13 +208,14 @@ while IFS='=' read key _; do
195208
done < "$PERSIST_DIR/config.sh"
196209
echo "[*] Tip: You could edit config.sh in /data/adb/system_app_nuker/config.sh"
197210

198-
echo "[✓] System App Nuker setup completed successfully"
211+
echo ""
212+
echo "[✓] System App Nuker has been set up successfully."
199213

200214
# warn KSU or APatch user if module would not be mounted globally
201215
if { [ -n "$KSU" ] || [ -n "$APATCH" ]; } && \
202216
[ "$use_mountify_script" != true ] && [ "$mountify_mounted" != true ]; then
203-
echo "[!] Notice: KernelSU or APatch detected. Module will not be mounted globally"
204-
echo "[!] Tip: Disable 'unmount modules by default' to avoid problems"
217+
echo "[!] Notice: KernelSU or APatch detected. Module will not be mounted globally."
218+
echo "[!] Tip: Disable 'unmount modules by default' to avoid problems."
205219
fi
206220

207221
# give space before post-customize.sh manager thing

0 commit comments

Comments
 (0)