From cf64a4c6e2218f38083faa8c6fc30296941d1026 Mon Sep 17 00:00:00 2001 From: j-hc <25510067+j-hc@users.noreply.github.com> Date: Sun, 24 Jul 2022 17:41:50 +0300 Subject: [PATCH] configurable magisk update --- build.conf | 4 +++- utils.sh | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/build.conf b/build.conf index 49189d6..1a46240 100644 --- a/build.conf +++ b/build.conf @@ -1,4 +1,4 @@ -YT_PATCHER_ARGS="-e microg-support" +YT_PATCHER_ARGS="-e microg-support" # ex: for excluding patches: -e patchname -e anotherpatchname MUSIC_PATCHER_ARGS="-e microg-support" BUILD_YT=true @@ -6,6 +6,8 @@ BUILD_MUSIC_ARM64_V8A=true BUILD_MUSIC_ARM_V7A=true BUILD_TWITTER=true +ENABLE_MAGISK_UPDATE=true # set this to false if you do not want to receive updates from magisk app + UPDATE_PREBUILTS=true # this is the repo to fallback for magisk update json if you are not building on github actions ↓ diff --git a/utils.sh b/utils.sh index ed4b58d..5a0aa7e 100755 --- a/utils.sh +++ b/utils.sh @@ -219,8 +219,11 @@ name=YouTube ReVanced version=v${1} versionCode=${NEXT_VER_CODE} author=j-hc -description=mounts base.apk for YouTube ReVanced -updateJson=https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/update/yt-update.json" >"${MODULE_TEMPLATE_DIR}/module.prop" +description=mounts base.apk for YouTube ReVanced" >"${MODULE_TEMPLATE_DIR}/module.prop" + + if [ "$ENABLE_MAGISK_UPDATE" = true ]; then + echo "updateJson=https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/update/yt-update.json" >>"${MODULE_TEMPLATE_DIR}/module.prop" + fi } music_module_prop() { @@ -240,6 +243,9 @@ name=YouTube Music ReVanced version=v${1} versionCode=${NEXT_VER_CODE} author=j-hc -description=mounts base.apk for YouTube Music ReVanced -updateJson=${update_json}" >"${MODULE_TEMPLATE_DIR}/module.prop" +description=mounts base.apk for YouTube Music ReVanced" >"${MODULE_TEMPLATE_DIR}/module.prop" + + if [ "$ENABLE_MAGISK_UPDATE" = true ]; then + echo "updateJson=${update_json}" >>"${MODULE_TEMPLATE_DIR}/module.prop" + fi }