From 740559e3bc3e524ea62bd00c975a0575273338fb Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 10 Feb 2020 16:45:44 -0800 Subject: [PATCH] Fix int detection in scripts --- scripts/addon.d.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/addon.d.sh b/scripts/addon.d.sh index 3829dd4f2..bc6fb4ee5 100644 --- a/scripts/addon.d.sh +++ b/scripts/addon.d.sh @@ -13,9 +13,9 @@ trampoline() { exec sh /data/adb/magisk/addon.d.sh "$@" else OUTFD=$(ps | grep -v 'grep' | grep -oE 'update(.*)' | cut -d" " -f3) - [ "$OUTFD" -eq "$OUTFD" ] 2>/dev/null || OUTFD=$(ps -Af | grep -v 'grep' | grep -oE 'update(.*)' | cut -d" " -f3) - [ "$OUTFD" -eq "$OUTFD" ] 2>/dev/null || OUTFD=$(ps | grep -v 'grep' | grep -oE 'status_fd=(.*)' | cut -d= -f2) - [ "$OUTFD" -eq "$OUTFD" ] 2>/dev/null || OUTFD=$(ps -Af | grep -v 'grep' | grep -oE 'status_fd=(.*)' | cut -d= -f2) + [ "$OUTFD" == "$((OUTFD * 1))" ] || OUTFD=$(ps -Af | grep -v 'grep' | grep -oE 'update(.*)' | cut -d" " -f3) + [ "$OUTFD" == "$((OUTFD * 1))" ] || OUTFD=$(ps | grep -v 'grep' | grep -oE 'status_fd=(.*)' | cut -d= -f2) + [ "$OUTFD" == "$((OUTFD * 1))" ] || OUTFD=$(ps -Af | grep -v 'grep' | grep -oE 'status_fd=(.*)' | cut -d= -f2) ui_print() { echo -e "ui_print $1\nui_print" >> /proc/self/fd/$OUTFD; } ui_print "************************"