diff --git a/README.md b/README.md index 60bc5e2..45ea87f 100755 --- a/README.md +++ b/README.md @@ -18,13 +18,13 @@ Get the [latest CI release](https://github.com/NoName-exe/revanced-extended/rele * Support Magisk and KernelSU. ## Notes -* Use [mindetach](https://github.com/j-hc/mindetach-magisk) to block Play Store from updating YouTube and YouTube-Music. +* Use [mindetach](https://github.com/j-hc/mindetach-magisk) or [zygisk-detach](https://github.com/j-hc/zygisk-detach) to block Play Store from updating YouTube and YouTube-Music. * Non-root versions of YouTube and YouTube-Music require [Vanced MicroG](https://github.com/inotia00/VancedMicroG/releases/latest) or [mMicroG](https://github.com/inotia00/mMicroG/releases/latest) to work. ## Credits -[j-hc](https://github.com/j-hc) for [mindetach](https://github.com/j-hc/mindetach-magisk) and the [script on which this is based on](https://github.com/j-hc/revanced-magisk-module). +[j-hc](https://github.com/j-hc) for [mindetach](https://github.com/j-hc/mindetach-magisk), [zygisk-detach](https://github.com/j-hc/zygisk-detach) and the [script on which this is based on](https://github.com/j-hc/revanced-magisk-module). -[YT-Advanced](https://github.com/YT-Advanced) for [rex-patches](https://github.com/YT-Advanced/ReX-patches) +[YT-Advanced](https://github.com/YT-Advanced) for [rex-patches](https://github.com/YT-Advanced/ReX-patches). [inotia00](https://github.com/inotia00) for [Vanced MicroG](https://github.com/inotia00/VancedMicroG) and [mMicroG](https://github.com/inotia00/mMicroG). diff --git a/build.sh b/build.sh index 876b7f4..c155ce6 100755 --- a/build.sh +++ b/build.sh @@ -76,12 +76,14 @@ build_rv_w() { fi } +declare -A cliriplib idx=0 for table_name in $(toml_get_table_names); do if [ -z "$table_name" ]; then continue; fi t=$(toml_get_table "$table_name") enabled=$(toml_get "$t" enabled) && vtf "$enabled" "enabled" || enabled=true if [ "$enabled" = false ]; then continue; fi + if ((idx >= PARALLEL_JOBS)); then wait -n; fi declare -A app_args patches_src=$(toml_get "$t" patches-source) || patches_src=$DEF_PATCHES_SRC @@ -90,7 +92,12 @@ for table_name in $(toml_get_table_names); do integrations_ver=$(toml_get "$t" integrations-version) || integrations_ver=$DEF_INTEGRATIONS_VER cli_src=$(toml_get "$t" cli-source) || cli_src=$DEF_CLI_SRC cli_ver=$(toml_get "$t" cli-version) || cli_ver=$DEF_CLI_VER - if ! set_prebuilts "$integrations_src" "$patches_src" "$cli_src" "$integrations_ver" "$patches_ver" "$cli_ver"; then + + if [ "${SETPRE:-}" ]; then + if ! set_prebuilts "$integrations_src" "$patches_src" "$cli_src" "$integrations_ver" "$patches_ver" "$cli_ver"; then + abort "couldnt set prebuilts" + fi + else if ! RVP="$(get_rv_prebuilts "$integrations_src" "$patches_src" "$integrations_ver" "$patches_ver" "$cli_src" "$cli_ver")"; then abort "could not download rv prebuilts" fi @@ -100,7 +107,15 @@ for table_name in $(toml_get_table_names); do app_args[ptjar]=$rv_patches_jar app_args[ptjs]=$rv_patches_json fi - if [[ $(java -jar "${app_args[cli]}" patch 2>&1) == *rip-lib* ]]; then app_args[riplib]=true; else app_args[riplib]=false; fi + if [[ -v cliriplib[${app_args[cli]}] ]]; then app_args[riplib]=${cliriplib[${app_args[cli]}]}; else + if [[ $(java -jar "${app_args[cli]}" patch 2>&1) == *rip-lib* ]]; then + cliriplib[${app_args[cli]}]=true + app_args[riplib]=true + else + cliriplib[${app_args[cli]}]=false + app_args[riplib]=false + fi + fi app_args[rv_brand]=$(toml_get "$t" rv-brand) || app_args[rv_brand]="$DEF_RV_BRAND" app_args[excluded_patches]=$(toml_get "$t" excluded-patches) || app_args[excluded_patches]="" @@ -141,15 +156,15 @@ for table_name in $(toml_get_table_names); do app_args[table]="$table_name (arm64-v8a)" app_args[module_prop_name]="${app_args[module_prop_name]}-arm64" app_args[arch]="arm64-v8a" - if ((idx >= PARALLEL_JOBS)); then wait -n; else idx=$((idx + 1)); fi + idx=$((idx + 1)) build_rv_w app_args[table]="$table_name (arm-v7a)" app_args[module_prop_name]="${app_args[module_prop_name]}-arm" app_args[arch]="arm-v7a" - if ((idx >= PARALLEL_JOBS)); then wait -n; else idx=$((idx + 1)); fi + idx=$((idx + 1)) build_rv_w else - if ((idx >= PARALLEL_JOBS)); then wait -n; else idx=$((idx + 1)); fi + idx=$((idx + 1)) build_rv_w fi done