autopif2.sh: Support updating TS security_patch.txt in Simple format

This commit is contained in:
Chris Renshaw
2025-07-17 22:25:59 -03:00
committed by GitHub
parent c9d4064dfe
commit 8cd6155ffb

View File

@@ -195,6 +195,7 @@ if [ "$DIR" = /data/adb/modules/playintegrityfix/autopif2 ]; then
if [ -f "$TS_SECPAT" ]; then
item "Updating Tricky Store security_patch.txt ...";
[ -s "$TS_SECPAT" ] || echo "all=" > $TS_SECPAT;
grep -qE '^[0-9]{8}$' $TS_SECPAT && sed -i "s/^.*$/${SECURITY_PATCH//-}/" $TS_SECPAT;
grep -q 'all=' $TS_SECPAT && sed -i "s/all=.*/all=$SECURITY_PATCH/" $TS_SECPAT;
grep -q 'system=' $TS_SECPAT && sed -i "s/system=.*/system=$(echo ${SECURITY_PATCH//-} | cut -c-6)/" $TS_SECPAT;
cat $TS_SECPAT;