mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-05-02 07:34:28 +02:00
select version by frequency of supported patches
This commit is contained in:
parent
7a1a574618
commit
1c091f4196
2
utils.sh
2
utils.sh
@ -148,7 +148,7 @@ semver_validate() {
|
|||||||
}
|
}
|
||||||
get_patch_last_supported_ver() {
|
get_patch_last_supported_ver() {
|
||||||
jq -r ".[] | select(.compatiblePackages[].name==\"${1}\" and .excluded==false) | .compatiblePackages[].versions" "$RV_PATCHES_JSON" |
|
jq -r ".[] | select(.compatiblePackages[].name==\"${1}\" and .excluded==false) | .compatiblePackages[].versions" "$RV_PATCHES_JSON" |
|
||||||
tr -d ' ,\t[]"' | sort -u | grep -v '^$' | get_largest_ver || return 1
|
tr -d ' ,\t[]"' | grep -v '^$' | sort | uniq -c | sort -nr | head -1 | xargs | cut -d' ' -f2 || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
dl_if_dne() {
|
dl_if_dne() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user