mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-04-29 14:14:38 +02:00
cache cli list-patches
This commit is contained in:
parent
6f14ee9dc7
commit
ce1dd09cc0
14
utils.sh
14
utils.sh
@ -222,10 +222,10 @@ semver_validate() {
|
||||
[ ${#ac} = 0 ]
|
||||
}
|
||||
get_patch_last_supported_ver() {
|
||||
local pkg_name=$1 inc_sel=$2 _exc_sel=$3 _exclusive=$4 # TODO: resolve using all of these
|
||||
local list_patches=$1 pkg_name=$2 inc_sel=$3 _exc_sel=$4p _exclusive=$5 # TODO: resolve using all of these
|
||||
local op
|
||||
if [ "$inc_sel" ]; then
|
||||
if ! op=$(java -jar "$rv_cli_jar" list-patches "$rv_patches_jar" -f "$pkg_name" -v -p 2>&1 | awk '{$1=$1}1'); then
|
||||
if ! op=$(awk '{$1=$1}1' <<<"$list_patches"); then
|
||||
epr "list-patches: '$op'"
|
||||
return 1
|
||||
fi
|
||||
@ -469,7 +469,7 @@ build_rv() {
|
||||
fi
|
||||
local get_latest_ver=false
|
||||
if [ "$version_mode" = auto ]; then
|
||||
if ! version=$(get_patch_last_supported_ver "$pkg_name" \
|
||||
if ! version=$(get_patch_last_supported_ver "$pkg_name" "$list_patches" \
|
||||
"${args[included_patches]}" "${args[excluded_patches]}" "${args[exclusive_patches]}"); then
|
||||
exit 1
|
||||
elif [ -z "$version" ]; then get_latest_ver=true; fi
|
||||
@ -519,17 +519,17 @@ build_rv() {
|
||||
abort "apk signature mismatch '$stock_apk'"
|
||||
fi
|
||||
log "${table}: ${version}"
|
||||
local list_patches
|
||||
list_patches=$(java -jar "$rv_cli_jar" list-patches "$rv_patches_jar" -f "$pkg_name" -v -p 2>&1)
|
||||
|
||||
local microg_patch
|
||||
microg_patch=$(java -jar "$rv_cli_jar" list-patches "$rv_patches_jar" -f "$pkg_name" -v -p 2>&1 |
|
||||
grep "^Name: " | grep -i "gmscore\|microg" || :) microg_patch=${microg_patch#*: }
|
||||
microg_patch=$(grep "^Name: " <<<"$list_patches" | grep -i "gmscore\|microg" || :) microg_patch=${microg_patch#*: }
|
||||
if [ -n "$microg_patch" ] && [[ ${p_patcher_args[*]} =~ $microg_patch ]]; then
|
||||
epr "You cant include/exclude microg patch as that's done by rvmm builder automatically."
|
||||
p_patcher_args=("${p_patcher_args[@]//-[ei] ${microg_patch}/}")
|
||||
fi
|
||||
local spoof_streams_patch
|
||||
spoof_streams_patch=$(java -jar "$rv_cli_jar" list-patches "$rv_patches_jar" -f "$pkg_name" -v -p 2>&1 |
|
||||
grep "^Name: " | grep -i "spoof" | grep -i "streams" || :) spoof_streams_patch=${spoof_streams_patch#*: }
|
||||
spoof_streams_patch=$(grep "^Name: " <<<"$list_patches" | grep -i "spoof" | grep -i "streams" || :) spoof_streams_patch=${spoof_streams_patch#*: }
|
||||
if [ -n "$spoof_streams_patch" ] && [[ ${p_patcher_args[*]} =~ $spoof_streams_patch ]]; then
|
||||
epr "You cant include/exclude spoof stream patch as that's done by rvmm builder automatically."
|
||||
p_patcher_args=("${p_patcher_args[@]//-[ei] ${spoof_streams_patch}/}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user