Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions module/customize.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
#!/system/bin/sh
#!/system/bin/sh
# customize.sh - Safe Installer

MODPATH=${0%/*}
MODULE_NAME=targetedfix
MODULE_PATH=/data/adb/modules/$MODULE_NAME
UPDATE_PATH=/data/adb/modules_update/$MODULE_NAME
# 1. Setup Variables
# CRITICAL: Do NOT define MODPATH manually. Trust the Manager.
MODID=targetedfix
LIVE_PATH="/data/adb/modules/$MODID"

ui_print "-> Installing $MODULE_NAME..."
ui_print "- Installing TargetedFix..."

# If old install exists = update/reinstall
if [ -d "$MODULE_PATH/config" ]; then
ui_print "-> Backing up user configs..."
mkdir -p "$UPDATE_PATH/config"

for f in "$MODULE_PATH/config/"*; do
[ -s "$f" ] && cp -af "$f" "$UPDATE_PATH/config/"
done 2>/dev/null
# 2. CONFIG RESTORATION
# Check if config folder exists AND is not empty
if [ -d "$LIVE_PATH/config" ] && [ "$(ls -A "$LIVE_PATH/config")" ]; then
ui_print "- Preserving user config..."

# A. Delete the default 'config' folder
rm -rf "$MODPATH/config"

# B. Copy the user's clean config folder
cp -af "$LIVE_PATH/config" "$MODPATH/"
fi

ui_print "-> $MODULE_NAME installation done!"
ui_print "-> Thanks for using this module.🙂"

exit 0
ui_print "- Installation Done!"
ui_print "- Thanks for using this module.🙂"
13 changes: 0 additions & 13 deletions module/post-fs-data.sh

This file was deleted.

13 changes: 0 additions & 13 deletions module/service.sh

This file was deleted.