autopif2.sh: also support Simple dashed date, ensure newline

This commit is contained in:
Chris Renshaw
2025-07-17 23:05:38 -03:00
committed by GitHub
parent 8cd6155ffb
commit 72e2124a8e

View File

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