From 07d36084cce286ece1b21e21e59f0518e9bb974d Mon Sep 17 00:00:00 2001 From: someone5678 Date: Sat, 3 Sep 2022 23:26:38 +0900 Subject: [PATCH] scripts: Fix MindTheGapps integration * Fix MindTheGapps integration failure in build.sh due to missing element in GAPPS_BRAND_MAP and GAPPS_VARIANT_MAP * Change MindTheGApps to MindTheGapps as that is the official name of the project[1] * Add PRODUCT_SIZE caculation as MindTheGApps has gapps blobs and packages in product partion too ref: [1] https://gitlab.com/MindTheGapps/vendor_gapps --- scripts/build.sh | 8 ++++++-- scripts/run.sh | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 76960c3..c228f85 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -102,7 +102,7 @@ usage(){ --arch Architecture of WSA, x64 or arm64, default: $ARCH --release-type Release type of WSA, retail, RP (Release Preview), WIS (Insider Slow) or WIF (Insider Fast), default: $RELEASE_TYPE --magisk-ver Magisk version, stable or canary, default: $MAGISK_VER - --gapps-brand GApps brand, OpenGApps or MindTheGApps, default: $GAPPS_BRAND + --gapps-brand GApps brand, OpenGApps or MindTheGapps, default: $GAPPS_BRAND --gapps-variant GApps variant, pico or full, etc...., default: $GAPPS_VARIANT --root-sol Root solution, magisk or none, default: $ROOT_SOL --remove-amazon Remove Amazon Appstore from the system, default: false @@ -183,7 +183,7 @@ MAGISK_VER_MAP=( GAPPS_BRAND_MAP=( "OpenGApps" - "MindTheGApps" + "MindTheGapps" "none" ) @@ -198,6 +198,7 @@ GAPPS_VARIANT_MAP=( "tvstock" "tvmini" "none" + "MindTheGapps" ) ROOT_SOL_MAP=( @@ -382,6 +383,9 @@ if [ -d "$WORK_DIR"/gapps ]; then if [ -d "$WORK_DIR"/gapps/system_ext ]; then SYSTEM_SIZE=$(( SYSTEM_SIZE - $(du --apparent-size -sB512 "$WORK_DIR"/gapps/system_ext | cut -f1) )) fi + if [ -d "$WORK_DIR"/gapps/product ]; then + PRODUCT_SIZE=$(( PRODUCT_SIZE - $(du --apparent-size -sB512 "$WORK_DIR"/gapps/product | cut -f1) )) + fi fi if [ -d "$WORK_DIR"/magisk ]; then SYSTEM_SIZE=$(( SYSTEM_SIZE + $(du --apparent-size -sB512 "$WORK_DIR"/magisk/magisk | cut -f1) )) diff --git a/scripts/run.sh b/scripts/run.sh index 6d1eca4..07083ca 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -21,6 +21,8 @@ # DEBUG=--debug # CUSTOM_MAGISK=--magisk-custom +DOWNLOAD_DIR=../download + if [ ! "$BASH_VERSION" ] ; then echo "Please do not use sh to run this script, just execute it directly" 1>&2 exit 1