From 2857e3d2f8dc11c353aa726654957fedd3fec318 Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Fri, 16 Aug 2024 14:52:37 -0300 Subject: [PATCH] autopif.sh: prefer and use my busybox directly if somehow not on PATH --- module/autopif.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/autopif.sh b/module/autopif.sh index b054563..543a3bd 100644 --- a/module/autopif.sh +++ b/module/autopif.sh @@ -15,7 +15,9 @@ esac; DIR=$(dirname "$(readlink -f "$DIR")"); if ! which wget >/dev/null || grep -q "wget-curl" $(which wget); then - if [ -f /data/adb/magisk/busybox ] && /data/adb/magisk/busybox ping -c1 -s2 sourceforge.net 2>&1 | grep -vq "bad address"; then + if [ -f /data/adb/modules/busybox-ndk/system/*/busybox ]; then + wget() { /data/adb/modules/busybox-ndk/system/*/busybox wget "$@"; } + elif [ -f /data/adb/magisk/busybox ] && /data/adb/magisk/busybox ping -c1 -s2 sourceforge.net 2>&1 | grep -vq "bad address"; then wget() { /data/adb/magisk/busybox wget "$@"; } elif [ -f /data/adb/ksu/bin/busybox ]; then wget() { /data/adb/ksu/bin/busybox wget "$@"; }