You've already forked PlayIntegrityFork
mirror of
https://github.com/osm0sis/PlayIntegrityFork.git
synced 2025-09-06 06:37:06 +00:00
migrate.sh: be more verbose migrating from v4, catch another edge case
This commit is contained in:
+15
-2
@@ -10,7 +10,7 @@ N="
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
-i|--install|install) INSTALL=1; shift;;
|
-i|--install|install) INSTALL=1; shift;;
|
||||||
*) echo "custom.pif.json migration script \
|
*) echo "custom.pif.json migration script \
|
||||||
$N by osm0sis @ xda-developers $N";;
|
$N by osm0sis @ xda-developers $N";;
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
item() { echo "- $@"; }
|
item() { echo "- $@"; }
|
||||||
@@ -32,7 +32,7 @@ if [ -f "$1" ]; then
|
|||||||
else
|
else
|
||||||
case "$0" in
|
case "$0" in
|
||||||
*.sh) DIR="$0";;
|
*.sh) DIR="$0";;
|
||||||
*) DIR="$(lsof -p $$ 2>/dev/null | grep -o '/.*migrate.sh$')";;
|
*) DIR="$(lsof -p $$ 2>/dev/null | grep -o '/.*migrate.sh$')";;
|
||||||
esac;
|
esac;
|
||||||
fi;
|
fi;
|
||||||
DIR=$(dirname "$(readlink -f "$DIR")");
|
DIR=$(dirname "$(readlink -f "$DIR")");
|
||||||
@@ -51,6 +51,10 @@ for FIELD in $ALLFIELDS; do
|
|||||||
eval $FIELD=\"$(grep_get_json \"$FIELD\")\";
|
eval $FIELD=\"$(grep_get_json \"$FIELD\")\";
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
if [ -n "$ID" ] && ! grep_check_json build.id; then
|
||||||
|
item 'Simple entry ID found, changing to ID field and "*.build.id" property ...';
|
||||||
|
fi;
|
||||||
|
|
||||||
if [ -z "$ID" ] && grep_check_json BUILD_ID; then
|
if [ -z "$ID" ] && grep_check_json BUILD_ID; then
|
||||||
item 'Deprecated entry BUILD_ID found, changing to ID field and "*.build.id" property ...';
|
item 'Deprecated entry BUILD_ID found, changing to ID field and "*.build.id" property ...';
|
||||||
ID="$(grep_get_json BUILD_ID)";
|
ID="$(grep_get_json BUILD_ID)";
|
||||||
@@ -65,6 +69,10 @@ if grep_check_json VNDK_VERSION; then
|
|||||||
VNDK_VERSION="$(grep_get_json VNDK_VERSION)";
|
VNDK_VERSION="$(grep_get_json VNDK_VERSION)";
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
if [ -n "$DEVICE_INITIAL_SDK_INT" ] && ! grep_check_json api_level; then
|
||||||
|
item 'Simple entry DEVICE_INITIAL_SDK_INT found, changing to DEVICE_INITIAL_SDK_INT field and "*api_level" property ...';
|
||||||
|
fi;
|
||||||
|
|
||||||
if [ -z "$DEVICE_INITIAL_SDK_INT" ] && grep_check_json FIRST_API_LEVEL; then
|
if [ -z "$DEVICE_INITIAL_SDK_INT" ] && grep_check_json FIRST_API_LEVEL; then
|
||||||
item 'Deprecated entry FIRST_API_LEVEL found, changing to DEVICE_INITIAL_SDK_INT field and "*api_level" property ...';
|
item 'Deprecated entry FIRST_API_LEVEL found, changing to DEVICE_INITIAL_SDK_INT field and "*api_level" property ...';
|
||||||
DEVICE_INITIAL_SDK_INT="$(grep_get_json FIRST_API_LEVEL)";
|
DEVICE_INITIAL_SDK_INT="$(grep_get_json FIRST_API_LEVEL)";
|
||||||
@@ -82,6 +90,11 @@ EOF
|
|||||||
done;
|
done;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
if [ -z "$SECURITY_PATCH" -o "$SECURITY_PATCH" = "null" ]; then
|
||||||
|
item 'Missing required SECURITY_PATCH field and "*.security_patch" property value found, leaving empty ...';
|
||||||
|
unset SECURITY_PATCH;
|
||||||
|
fi;
|
||||||
|
|
||||||
if [ -z "$DEVICE_INITIAL_SDK_INT" -o "$DEVICE_INITIAL_SDK_INT" = "null" ]; then
|
if [ -z "$DEVICE_INITIAL_SDK_INT" -o "$DEVICE_INITIAL_SDK_INT" = "null" ]; then
|
||||||
item 'Missing required DEVICE_INITIAL_SDK_INT field and "*api_level" property value found, setting to 25 ...';
|
item 'Missing required DEVICE_INITIAL_SDK_INT field and "*api_level" property value found, setting to 25 ...';
|
||||||
DEVICE_INITIAL_SDK_INT=25;
|
DEVICE_INITIAL_SDK_INT=25;
|
||||||
|
|||||||
Reference in New Issue
Block a user