Add skip download wsa (#287)

This commit is contained in:
Howard Wu 2022-12-09 18:10:28 +08:00 committed by GitHub
parent c86cd29e33
commit 67682f8ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,6 +217,7 @@ Additional Options:
--compress Compress the WSA, The default format is 7z, you can use the format specified by --compress-format
--offline Build WSA offline
--magisk-custom Install custom Magisk
--skip-download-wsa Skip download WSA
--debug Debug build mode
--help Show this help message and exit
--nofix-props No fix \"build.prop\"
@ -247,6 +248,7 @@ ARGUMENT_LIST=(
"magisk-custom"
"debug"
"help"
"skip-download-wsa"
)
default
@ -275,6 +277,7 @@ while [[ $# -gt 0 ]]; do
--magisk-custom ) CUSTOM_MAGISK="debug"; shift ;;
--magisk-ver ) MAGISK_VER="$2"; shift 2 ;;
--debug ) DEBUG="on"; shift ;;
--skip-download-wsa ) DOWN_WSA="no"; shift ;;
--help ) usage; exit 0 ;;
-- ) shift; break;;
esac
@ -364,10 +367,14 @@ update_gapps_zip_name
if [ -z "${OFFLINE+x}" ]; then
trap 'rm -f -- "${DOWNLOAD_DIR:?}/${DOWNLOAD_CONF_NAME}"' EXIT
require_su
if [ "${DOWN_WSA}" != "no" ]; then
echo "Generate Download Links"
python3 generateWSALinks.py "$ARCH" "$RELEASE_TYPE" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
# shellcheck disable=SC1091
source "${WORK_DIR:?}/ENV" || abort
else
DOWN_WSA_MAIN_VERSION=2211
fi
if [[ "$DOWN_WSA_MAIN_VERSION" -ge 2211 ]]; then
ANDROID_API=33
update_gapps_zip_name