From 6ee2b65b753ad5c37d89d2cd655bf4c55e178be0 Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Tue, 11 Feb 2025 17:25:50 +0800 Subject: [PATCH] spacing format --- module/service.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/module/service.sh b/module/service.sh index e61fc4f..aca090c 100644 --- a/module/service.sh +++ b/module/service.sh @@ -28,22 +28,22 @@ set_security_patch() { vendor_patch_after_1y=$(echo "$vendor_patch + 10000" | bc) TODAY=$(date +%Y%m%d) if [ "$TODAY" -ge "$vendor_patch_after_1y" ]; then - [ -f "/data/adb/modules/playintegrityfix/pif.json" ] && PIF="/data/adb/modules/playintegrityfix/pif.json" - [ -f "/data/adb/pif.json" ] && PIF="/data/adb/pif.json" - [ -f "/data/adb/modules/playintegrityfix/custom.pif.json" ] && PIF="/data/adb/modules/playintegrityfix/custom.pif.json" - security_patch=$(grep '"SECURITY_PATCH"' "$PIF" | sed 's/.*: "//; s/".*//') - [ -z "$security_patch" ] && security_patch=$(getprop ro.build.version.security_patch) + [ -f "/data/adb/modules/playintegrityfix/pif.json" ] && PIF="/data/adb/modules/playintegrityfix/pif.json" + [ -f "/data/adb/pif.json" ] && PIF="/data/adb/pif.json" + [ -f "/data/adb/modules/playintegrityfix/custom.pif.json" ] && PIF="/data/adb/modules/playintegrityfix/custom.pif.json" + security_patch=$(grep '"SECURITY_PATCH"' "$PIF" | sed 's/.*: "//; s/".*//') + [ -z "$security_patch" ] && security_patch=$(getprop ro.build.version.security_patch) - formatted_security_patch=$(echo "$security_patch" | sed 's/-//g') - security_patch_after_1y=$(echo "$formatted_security_patch + 10000" | bc) - if [ -n "$formatted_security_patch" ] && [ "$TODAY" -lt "$security_patch_after_1y" ]; then - TS_version=$(grep "versionCode=" "$TS/module.prop" | cut -d'=' -f2) - if [ "$TS_version" -lt 158 ]; then - resetprop ro.vendor.build.security_patch "$security_patch" - resetprop ro.build.version.security_patch "$security_patch" - else - echo "all=$formatted_security_patch" > "$TARGET_DIR/security_patch.txt" - fi + formatted_security_patch=$(echo "$security_patch" | sed 's/-//g') + security_patch_after_1y=$(echo "$formatted_security_patch + 10000" | bc) + if [ -n "$formatted_security_patch" ] && [ "$TODAY" -lt "$security_patch_after_1y" ]; then + TS_version=$(grep "versionCode=" "$TS/module.prop" | cut -d'=' -f2) + if [ "$TS_version" -lt 158 ]; then + resetprop ro.vendor.build.security_patch "$security_patch" + resetprop ro.build.version.security_patch "$security_patch" + else + echo "all=$formatted_security_patch" > "$TARGET_DIR/security_patch.txt" + fi fi fi }