remove curl binary

use busybox wget binary instead of curl binary to fetch exclude-list
This commit is contained in:
KOWX712
2024-11-14 21:44:31 +08:00
parent e9346303ac
commit bcfb8c12ad
7 changed files with 33 additions and 15 deletions
+1 -9
View File
@@ -5,19 +5,11 @@ initialize() {
cp "$MODPATH/module.prop" "$COMPATH/module.prop.orig"
mv "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh"
sed -i "s|\"set-path\"|\"/data/adb/modules/$MODNAME/common/\"|" "$MODPATH/webroot/index.js" || {
sed -i "s|\"set-path\"|\"/data/adb/modules/$MODID/common/\"|" "$MODPATH/webroot/index.js" || {
ui_print "! Failed to replace path"
abort
}
# handle missing binary
if [ ! -f "/system/bin/curl" ]; then
mkdir -p "$MODPATH/system/bin"
mv "$MODPATH/bin/$(getprop ro.product.cpu.abi)/curl" "$MODPATH/system/bin/curl"
set_perm "$MODPATH/system/bin/curl" 0 2000 0777
fi
rm -rf "$MODPATH/bin"
set_perm $SCRIPT_DIR/UpdateTargetList.sh 0 2000 0755
set_perm $COMPATH/get_exclude-list.sh 0 2000 0755
}