migrate.sh: be more verbose migrating from v4, catch another edge case

This commit is contained in:
osm0sis
2024-02-04 21:57:01 -04:00
parent fa418290b3
commit 87eb713cbd
+13
View File
@@ -51,6 +51,10 @@ for FIELD in $ALLFIELDS; do
eval $FIELD=\"$(grep_get_json \"$FIELD\")\";
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
item 'Deprecated entry BUILD_ID found, changing to ID field and "*.build.id" property ...';
ID="$(grep_get_json BUILD_ID)";
@@ -65,6 +69,10 @@ if grep_check_json VNDK_VERSION; then
VNDK_VERSION="$(grep_get_json VNDK_VERSION)";
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
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)";
@@ -82,6 +90,11 @@ EOF
done;
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
item 'Missing required DEVICE_INITIAL_SDK_INT field and "*api_level" property value found, setting to 25 ...';
DEVICE_INITIAL_SDK_INT=25;