Skip to content

Commit

Permalink
fix rv extended
Browse files Browse the repository at this point in the history
  • Loading branch information
j-hc committed Dec 15, 2024
1 parent ce1dd09 commit d439382
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ semver_validate() {
[ ${#ac} = 0 ]
}
get_patch_last_supported_ver() {
local list_patches=$1 pkg_name=$2 inc_sel=$3 _exc_sel=$4p _exclusive=$5 # TODO: resolve using all of these
local list_patches=$1 pkg_name=$2 inc_sel=$3 _exc_sel=$4 _exclusive=$5 # TODO: resolve using all of these
local op
if [ "$inc_sel" ]; then
if ! op=$(awk '{$1=$1}1' <<<"$list_patches"); then
Expand Down Expand Up @@ -415,7 +415,7 @@ get_archive_pkg_name() { echo "$__ARCHIVE_PKG_NAME__"; }

patch_apk() {
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
local cmd="java -jar $rv_cli_jar patch $stock_input --purge -o $patched_apk -p $rv_patches_jar --keystore=ks.keystore \
local cmd="env -u GITHUB_REPOSITORY java -jar $rv_cli_jar patch $stock_input --purge -o $patched_apk -p $rv_patches_jar --keystore=ks.keystore \
--keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc $patcher_args"
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${AAPT2}"; fi
pr "$cmd"
Expand Down Expand Up @@ -467,9 +467,12 @@ build_rv() {
epr "empty pkg name, not building ${table}."
return 0
fi
local list_patches
list_patches=$(java -jar "$rv_cli_jar" list-patches "$rv_patches_jar" -f "$pkg_name" -v -p 2>&1)

local get_latest_ver=false
if [ "$version_mode" = auto ]; then
if ! version=$(get_patch_last_supported_ver "$pkg_name" "$list_patches" \
if ! version=$(get_patch_last_supported_ver "$list_patches" "$pkg_name" \
"${args[included_patches]}" "${args[excluded_patches]}" "${args[exclusive_patches]}"); then
exit 1
elif [ -z "$version" ]; then get_latest_ver=true; fi
Expand Down Expand Up @@ -519,8 +522,6 @@ 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=$(grep "^Name: " <<<"$list_patches" | grep -i "gmscore\|microg" || :) microg_patch=${microg_patch#*: }
Expand Down

0 comments on commit d439382

Please sign in to comment.