From d4393820a4c5c522983ae52030384d97041dddab Mon Sep 17 00:00:00 2001 From: j-hc Date: Sun, 15 Dec 2024 19:50:28 +0300 Subject: [PATCH] fix rv extended --- utils.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/utils.sh b/utils.sh index 7b3779d9dc..29e7337c99 100755 --- a/utils.sh +++ b/utils.sh @@ -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 @@ -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" @@ -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 @@ -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#*: }