Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
j-hc committed Sep 3, 2023
1 parent 170ef4d commit dacc09c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Extensive ReVanced builder

Get the [latest CI release](https://github.com/j-hc/revanced-magisk-module/releases).

[**mindetach module**](https://github.com/j-hc/mindetach-magisk) in the releases section detaches YouTube and YouTube Music from Play Store and blocks their forced updates.
[**mindetach module**](https://github.com/j-hc/mindetach-magisk) in the releases section detaches YouTube and YouTube Music from Play Store and blocks their forced updates.
[**zygisk-detach**](https://github.com/j-hc/zygisk-detach) is another detach module I made which is more powerful than mindetach. You can use it if you have zygisk enabled.

## Features
* Support all present and future ReVanced and [ReVanced Extended](https://github.com/inotia00/revanced-patches) apps
Expand Down
25 changes: 20 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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]=""
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dacc09c

Please sign in to comment.