You've already forked PlayIntegrityFork
mirror of
https://github.com/osm0sis/PlayIntegrityFork.git
synced 2025-09-06 06:37:06 +00:00
migrate.sh: optionally add advanced settings to json
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
-h|--help|help) echo "sh migrate.sh [-f] [file]"; exit 0;;
|
||||
-h|--help|help) echo "sh migrate.sh [-f] [-a] [file]"; exit 0;;
|
||||
esac;
|
||||
|
||||
N="
|
||||
@@ -21,6 +21,9 @@ grep_check_json() { grep -q "$1" "$FILE" && [ "$(grep_get_json "$1")" ]; }
|
||||
case "$1" in
|
||||
-f|--force|force) FORCE=1; shift;;
|
||||
esac;
|
||||
case "$1" in
|
||||
-a|--advanced|advanced) ADVANCED=1; shift;;
|
||||
esac;
|
||||
|
||||
if [ -f "$1" ]; then
|
||||
FILE="$1";
|
||||
@@ -100,8 +103,11 @@ echo "$N // System Properties";
|
||||
echo ' "*.build.id": "'$ID'",';
|
||||
echo ' "*.security_patch": "'$SECURITY_PATCH'",';
|
||||
[ -z "$VNDK_VERSION" ] || echo ' "*.vndk_version": "'$VNDK_VERSION'",';
|
||||
echo ' "*api_level": "'$DEVICE_INITIAL_SDK_INT'"';
|
||||
echo "}") > "$DIR/custom.pif.json";
|
||||
echo ' "*api_level": "'$DEVICE_INITIAL_SDK_INT'",';
|
||||
if [ "$ADVANCED" ]; then
|
||||
echo "$N // Advanced Settings";
|
||||
echo ' "verbose_logs": "0",';
|
||||
fi) | sed '$s/,/\n}/' > "$DIR/custom.pif.json";
|
||||
|
||||
[ "$INSTALL" ] || cat "$DIR/custom.pif.json";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user