You've already forked PlayIntegrityFork
mirror of
https://github.com/osm0sis/PlayIntegrityFork.git
synced 2025-09-06 06:37:06 +00:00
autopif2.sh: add test and busybox fallback for broken ROM toybox grep
- outdated/broken toybox grep would ignore -A1 if -m1 was present
This commit is contained in:
@@ -54,6 +54,14 @@ if date -D '%s' -d "$(date '+%s')" 2>&1 | grep -qE "bad date|invalid option"; th
|
||||
fi;
|
||||
fi;
|
||||
|
||||
if ! echo "A\nB" | grep -m1 -A1 "A" | grep -q "B"; then
|
||||
if ! find_busybox; then
|
||||
die "grep broken";
|
||||
else
|
||||
grep() { $BUSYBOX grep "$@"; }
|
||||
fi;
|
||||
fi;
|
||||
|
||||
if [ "$DIR" = /data/adb/modules/playintegrityfix ]; then
|
||||
DIR=$DIR/autopif2;
|
||||
mkdir -p $DIR;
|
||||
|
||||
Reference in New Issue
Block a user