Skip to content

Commit edea081

Browse files
KOWX712rifsxd
authored andcommitted
scripts/customize: implement hot update for webui, binaries and patch scripts
1 parent 1ccabd0 commit edea081

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

module/customize.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
MODDIR="/data/adb/modules/KPatch-Next"
2+
13
# Conflict with APatch
24
if [ "$APATCH" ]; then
35
abort "! APatch is unsupported"
@@ -19,3 +21,9 @@ fi
1921

2022
# backup module.prop
2123
cp "$MODPATH/module.prop" "$MODPATH/module.prop.bak"
24+
25+
# Hot update webui, patch scripts and binaries
26+
rm -rf "$MODDIR/webroot"/* "$MODDIR/bin"/* "$MODDIR/patch"/*
27+
cp -Lrf "$MODPATH/webroot"/* "$MODDIR/webroot"
28+
cp -Lrf "$MODPATH/bin"/* "$MODDIR/bin"
29+
cp -Lrf "$MODPATH/patch"/* "$MODDIR/patch"

0 commit comments

Comments
 (0)