ksud: Support remove files in customize.sh by REMOVE variables.

e.g:

REMOVE="
/system/app/YouTube
/system/app/Bloatware
"
This commit is contained in:
tiann 2023-03-27 15:04:28 +08:00
parent 14b2afe78d
commit dcbbbab11e
No known key found for this signature in database
GPG Key ID: 6D3F65FFD9559C06

View File

@ -271,6 +271,12 @@ mktouch() {
chmod 644 $1
}
mark_remove() {
mkdir -p ${1%/*} 2>/dev/null
mknod $1 c 0 0
chmod 644 $1
}
request_size_check() {
reqSizeM=`du -ms "$1" | cut -f1`
}
@ -387,6 +393,12 @@ install_module() {
mktouch $MODPATH$TARGET/.replace
done
# Handle remove files
for TARGET in $REMOVE; do
ui_print "- Remove target: $TARGET"
mark_remove $MODPATH$TARGET
done
if $BOOTMODE; then
mktouch $NVBASE/modules/$MODID/update
rm -rf $NVBASE/modules/$MODID/remove 2>/dev/null