added remove-rv-integrations-checks configuration

This commit is contained in:
j-hc 2024-10-22 13:00:49 +03:00
parent 4d6ca4bbfc
commit 89368095e1
No known key found for this signature in database
GPG Key ID: CDF97F1DBFE904CD
3 changed files with 7 additions and 3 deletions

View File

@ -14,6 +14,9 @@ There exists an example below with all defaults shown and all the keys explicitl
```toml
parallel-jobs = 1 # amount of cores to use for parallel patching, if not set nproc is used
compression-level = 9 # module zip compression level
remove-rv-integrations-checks = true # remove checks from the revanced integrations
patches-source = "revanced/revanced-patches" # where to fetch patches bundle from. default: "revanced/revanced-patches"
integrations-source = "revanced/revanced-integrations" # where to fetch integrations from. default: "revanced/revanced-integrations"
cli-source = "j-hc/revanced-cli" # where to fetch cli from. default: "j-hc/revanced-cli"

View File

@ -20,6 +20,8 @@ COMPRESSION_LEVEL=$(toml_get "$main_config_t" compression-level) || COMPRESSION_
if ! PARALLEL_JOBS=$(toml_get "$main_config_t" parallel-jobs); then
if [ "$OS" = Android ]; then PARALLEL_JOBS=1; else PARALLEL_JOBS=$(nproc); fi
fi
REMOVE_RV_INTEGRATIONS_CHECKS=$(toml_get "$main_config_t" remove-rv-integrations-checks) || REMOVE_RV_INTEGRATIONS_CHECKS="true"
DEF_PATCHES_VER=$(toml_get "$main_config_t" patches-version) || DEF_PATCHES_VER="latest"
DEF_INTEGRATIONS_VER=$(toml_get "$main_config_t" integrations-version) || DEF_INTEGRATIONS_VER="latest"
DEF_CLI_VER=$(toml_get "$main_config_t" cli-version) || DEF_CLI_VER="latest"
@ -27,7 +29,7 @@ DEF_PATCHES_SRC=$(toml_get "$main_config_t" patches-source) || DEF_PATCHES_SRC="
DEF_INTEGRATIONS_SRC=$(toml_get "$main_config_t" integrations-source) || DEF_INTEGRATIONS_SRC="ReVanced/revanced-integrations"
DEF_CLI_SRC=$(toml_get "$main_config_t" cli-source) || DEF_CLI_SRC="j-hc/revanced-cli"
DEF_RV_BRAND=$(toml_get "$main_config_t" rv-brand) || DEF_RV_BRAND="ReVanced"
mkdir -p $TEMP_DIR $BUILD_DIR
mkdir -p "$TEMP_DIR" "$BUILD_DIR"
if [ "${2-}" = "--config-update" ]; then
config_update

View File

@ -106,7 +106,7 @@ get_rv_prebuilts() {
done
echo
if [ "$integs_file" ]; then
if [ "$integs_file" ] && [ "$REMOVE_RV_INTEGRATIONS_CHECKS" = true ]; then
if ! (
mkdir -p "${integs_file}-zip" || return 1
unzip -qo "${integs_file}" -d "${integs_file}-zip" || return 1
@ -119,7 +119,6 @@ get_rv_prebuilts() {
echo >&2 "Patching revanced-integrations failed"
fi
rm -r "${integs_file}-zip" || :
fi
}