select version by frequency of supported patches

This commit is contained in:
j-hc 2023-03-14 17:50:21 +03:00
parent 7a1a574618
commit 1c091f4196

View File

@ -148,7 +148,7 @@ semver_validate() {
}
get_patch_last_supported_ver() {
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() {