Skip to content

Commit bfbfcc7

Browse files
authored
Merge branch 'j-hc:main' into main
2 parents c19e31a + a0c9538 commit bfbfcc7

File tree

2 files changed

+97
-109
lines changed

2 files changed

+97
-109
lines changed

build.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env bash
22

33
set -euo pipefail
4+
shopt -s nullglob
45
trap "rm -rf temp/*tmp.* temp/*/*tmp.*; exit 130" INT
56

6-
if [ "${1:-}" = "clean" ]; then
7+
if [ "${1-}" = "clean" ]; then
78
rm -rf temp build logs build.md
89
exit 0
910
fi
@@ -28,14 +29,14 @@ DEF_CLI_SRC=$(toml_get "$main_config_t" cli-source) || DEF_CLI_SRC="j-hc/revance
2829
DEF_RV_BRAND=$(toml_get "$main_config_t" rv-brand) || DEF_RV_BRAND="ReVanced"
2930
mkdir -p $TEMP_DIR $BUILD_DIR
3031

31-
if [ "${2:-}" = "--config-update" ]; then
32+
if [ "${2-}" = "--config-update" ]; then
3233
config_update
3334
exit 0
3435
fi
3536

3637
: >build.md
3738
ENABLE_MAGISK_UPDATE=$(toml_get "$main_config_t" enable-magisk-update) || ENABLE_MAGISK_UPDATE=true
38-
if [ "$ENABLE_MAGISK_UPDATE" = true ] && [ -z "${GITHUB_REPOSITORY:-}" ]; then
39+
if [ "$ENABLE_MAGISK_UPDATE" = true ] && [ -z "${GITHUB_REPOSITORY-}" ]; then
3940
pr "You are building locally. Magisk updates will not be enabled."
4041
ENABLE_MAGISK_UPDATE=false
4142
fi
@@ -82,7 +83,7 @@ for table_name in $(toml_get_table_names); do
8283
cli_ver=$(toml_get "$t" cli-version) || cli_ver=$DEF_CLI_VER
8384

8485
if ! set_prebuilts "$integrations_src" "$patches_src" "$cli_src" "$integrations_ver" "$patches_ver" "$cli_ver"; then
85-
if ! RVP="$(get_rv_prebuilts "$integrations_src" "$patches_src" "$integrations_ver" "$patches_ver" "$cli_src" "$cli_ver")"; then
86+
if ! RVP="$(get_rv_prebuilts "$cli_src" "$cli_ver" "$integrations_src" "$integrations_ver" "$patches_src" "$patches_ver")"; then
8687
abort "could not download rv prebuilts"
8788
fi
8889
read -r rv_cli_jar rv_integrations_apk rv_patches_jar rv_patches_json <<<"$RVP"
@@ -104,9 +105,9 @@ for table_name in $(toml_get_table_names); do
104105
app_args[rv_brand]=$(toml_get "$t" rv-brand) || app_args[rv_brand]="$DEF_RV_BRAND"
105106

106107
app_args[excluded_patches]=$(toml_get "$t" excluded-patches) || app_args[excluded_patches]=""
107-
if [ -n "${app_args[excluded_patches]}" ] && [[ "${app_args[excluded_patches]}" != *'"'* ]]; then abort "patch names inside excluded-patches must be quoted"; fi
108+
if [ -n "${app_args[excluded_patches]}" ] && [[ ${app_args[excluded_patches]} != *'"'* ]]; then abort "patch names inside excluded-patches must be quoted"; fi
108109
app_args[included_patches]=$(toml_get "$t" included-patches) || app_args[included_patches]=""
109-
if [ -n "${app_args[included_patches]}" ] && [[ "${app_args[included_patches]}" != *'"'* ]]; then abort "patch names inside included-patches must be quoted"; fi
110+
if [ -n "${app_args[included_patches]}" ] && [[ ${app_args[included_patches]} != *'"'* ]]; then abort "patch names inside included-patches must be quoted"; fi
110111
app_args[exclusive_patches]=$(toml_get "$t" exclusive-patches) && vtf "${app_args[exclusive_patches]}" "exclusive-patches" || app_args[exclusive_patches]=false
111112
app_args[version]=$(toml_get "$t" version) || app_args[version]="auto"
112113
app_args[app_name]=$(toml_get "$t" app-name) || app_args[app_name]=$table_name
@@ -134,9 +135,9 @@ for table_name in $(toml_get_table_names); do
134135
app_args[archive_dlurl]=${app_args[archive_dlurl]%/}
135136
app_args[dl_from]=archive
136137
} || app_args[archive_dlurl]=""
137-
if [ -z "${app_args[dl_from]:-}" ]; then abort "ERROR: no 'apkmirror_dlurl', 'uptodown_dlurl' or 'apkmonk_dlurl' option was set for '$table_name'."; fi
138+
if [ -z "${app_args[dl_from]-}" ]; then abort "ERROR: no 'apkmirror_dlurl', 'uptodown_dlurl' or 'apkmonk_dlurl' option was set for '$table_name'."; fi
138139
app_args[arch]=$(toml_get "$t" arch) || app_args[arch]="all"
139-
if [ "${app_args[arch]}" != "both" ] && [ "${app_args[arch]}" != "all" ] && [[ "${app_args[arch]}" != "arm64-v8a"* ]] && [[ "${app_args[arch]}" != "arm-v7a"* ]]; then
140+
if [ "${app_args[arch]}" != "both" ] && [ "${app_args[arch]}" != "all" ] && [[ ${app_args[arch]} != "arm64-v8a"* ]] && [[ ${app_args[arch]} != "arm-v7a"* ]]; then
140141
abort "wrong arch '${app_args[arch]}' for '$table_name'"
141142
fi
142143

@@ -169,8 +170,7 @@ if [ -z "$(ls -A1 ${BUILD_DIR})" ]; then abort "All builds failed."; fi
169170

170171
log "\nInstall [Microg](https://github.com/ReVanced/GmsCore/releases) for non-root YouTube and YT Music APKs"
171172
log "Use [zygisk-detach](https://github.com/j-hc/zygisk-detach) to detach root ReVanced YouTube and YT Music from Play Store"
172-
log "\n[revanced-magisk-module](https://github.com/j-hc/revanced-magisk-module)"
173-
log "\nChangelog:"
173+
log "\n[revanced-magisk-module](https://github.com/j-hc/revanced-magisk-module)\n"
174174
log "$(cat $TEMP_DIR/*-rv/changelog.md)"
175175

176176
SKIPPED=$(cat $TEMP_DIR/skipped 2>/dev/null || :)

utils.sh

+87-99
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ TEMP_DIR="temp"
55
BIN_DIR="bin"
66
BUILD_DIR="build"
77

8-
if [ "${GITHUB_TOKEN:-}" ]; then GH_HEADER="Authorization: token ${GITHUB_TOKEN}"; else GH_HEADER=; fi
8+
if [ "${GITHUB_TOKEN-}" ]; then GH_HEADER="Authorization: token ${GITHUB_TOKEN}"; else GH_HEADER=; fi
99
NEXT_VER_CODE=${NEXT_VER_CODE:-$(date +'%Y%m%d')}
1010
REBUILD=${REBUILD:-false}
1111
OS=$(uname -o)
1212

1313
# -------------------- json/toml --------------------
14-
json_get() { grep -o "\"${1}\":[^\"]*\"[^\"]*\"" | sed -E 's/".*".*"(.*)"/\1/'; }
1514
toml_prep() { __TOML__=$(tr -d '\t\r' <<<"$1" | tr "'" '"' | grep -o '^[^#]*' | grep -v '^$' | sed -r 's/(\".*\")|\s*/\1/g; 1i []'); }
1615
toml_get_table_names() {
1716
local tn
@@ -31,60 +30,55 @@ toml_get() {
3130
pr() { echo -e "\033[0;32m[+] ${1}\033[0m"; }
3231
epr() {
3332
echo >&2 -e "\033[0;31m[-] ${1}\033[0m"
34-
if [ "${GITHUB_REPOSITORY:-}" ]; then echo -e "::error::utils.sh [-] ${1}\n"; fi
33+
if [ "${GITHUB_REPOSITORY-}" ]; then echo -e "::error::utils.sh [-] ${1}\n"; fi
3534
}
3635
abort() {
37-
epr "ABORT: ${1:-}"
36+
epr "ABORT: ${1-}"
3837
exit 1
3938
}
4039

4140
get_rv_prebuilts() {
42-
local integrations_src=$1 patches_src=$2 integrations_ver=$3 patches_ver=$4 cli_src=$5 cli_ver=$6
43-
local patches_dir=${patches_src%/*}
44-
patches_dir=${TEMP_DIR}/${patches_dir,,}-rv
45-
local integrations_dir=${integrations_src%/*}
46-
integrations_dir=${TEMP_DIR}/${integrations_dir,,}-rv
47-
local cli_dir=${cli_src%/*}
48-
cli_dir=${TEMP_DIR}/${cli_dir,,}-rv
49-
mkdir -p "$patches_dir" "$integrations_dir" "$cli_dir"
50-
41+
local cli_src=$1 cli_ver=$2 integrations_src=$3 integrations_ver=$4 patches_src=$5 patches_ver=$6
5142
pr "Getting prebuilts (${patches_src%/*})" >&2
52-
local rv_cli_url rv_integrations_url rv_patches rv_patches_dl rv_patches_url rv_patches_json
53-
54-
local rv_cli_rel="https://api.github.com/repos/${cli_src}/releases/"
55-
if [ "$cli_ver" ]; then rv_cli_rel+="tags/${cli_ver}"; else rv_cli_rel+="latest"; fi
56-
local rv_integrations_rel="https://api.github.com/repos/${integrations_src}/releases/"
57-
if [ "$integrations_ver" ]; then rv_integrations_rel+="tags/${integrations_ver}"; else rv_integrations_rel+="latest"; fi
58-
local rv_patches_rel="https://api.github.com/repos/${patches_src}/releases/"
59-
if [ "$patches_ver" ]; then rv_patches_rel+="tags/${patches_ver}"; else rv_patches_rel+="latest"; fi
60-
rv_cli_url=$(gh_req "$rv_cli_rel" - | json_get 'browser_download_url' | grep -E '\.jar$') || return 1
61-
local rv_cli_jar="${cli_dir}/${rv_cli_url##*/}"
62-
echo "CLI: $(cut -d/ -f4 <<<"$rv_cli_url")/$(cut -d/ -f9 <<<"$rv_cli_url") " >"$patches_dir/changelog.md"
63-
64-
rv_integrations_url=$(gh_req "$rv_integrations_rel" - | json_get 'browser_download_url' | grep -E '\.apk$') || return 1
65-
local rv_integrations_apk="${integrations_dir}/${rv_integrations_url##*/}"
66-
echo "Integrations: $(cut -d/ -f4 <<<"$rv_integrations_url")/$(cut -d/ -f9 <<<"$rv_integrations_url") " >>"$patches_dir/changelog.md"
67-
68-
rv_patches=$(gh_req "$rv_patches_rel" -) || return 1
69-
# rv_patches_changelog=$(json_get 'body' <<<"$rv_patches" | sed 's/\(\\n\)\+/\\n/g')
70-
rv_patches_dl=$(json_get 'browser_download_url' <<<"$rv_patches")
71-
rv_patches_json="${patches_dir}/patches-$(json_get 'tag_name' <<<"$rv_patches").json"
72-
rv_patches_url=$(grep -E '\.jar$' <<<"$rv_patches_dl")
73-
local rv_patches_jar="${patches_dir}/${rv_patches_url##*/}"
74-
[ -f "$rv_patches_jar" ] || REBUILD=true
75-
local nm
76-
nm=$(cut -d/ -f9 <<<"$rv_patches_url")
77-
echo "Patches: $(cut -d/ -f4 <<<"$rv_patches_url")/$nm " >>"$patches_dir/changelog.md"
78-
# shellcheck disable=SC2001
79-
echo -e "[Changelog](https://github.com/${patches_src}/releases/tag/v$(sed 's/.*-\(.*\)\..*/\1/' <<<"$nm"))\n" >>"$patches_dir/changelog.md"
80-
# echo -e "\n${rv_patches_changelog//# [/### [}\n---" >>"$patches_dir/changelog.md"
81-
82-
dl_if_dne "$rv_cli_jar" "$rv_cli_url" >&2 || return 1
83-
dl_if_dne "$rv_integrations_apk" "$rv_integrations_url" >&2 || return 1
84-
dl_if_dne "$rv_patches_jar" "$rv_patches_url" >&2 || return 1
85-
dl_if_dne "$rv_patches_json" "$(grep 'json' <<<"$rv_patches_dl")" >&2 || return 1
86-
87-
echo "$rv_cli_jar" "$rv_integrations_apk" "$rv_patches_jar" "$rv_patches_json"
43+
for f in "${TEMP_DIR}"/*-rv; do : >"${f}/changelog.md"; done
44+
for src_ver in "$cli_src CLI $cli_ver" "$integrations_src Integrations $integrations_ver" "$patches_src Patches $patches_ver"; do
45+
set -- $src_ver
46+
local src=$1 tag=$2 ver=${3-} ext
47+
if [ "$tag" = "CLI" ] || [ "$tag" = "Patches" ]; then
48+
ext="jar"
49+
elif [ "$tag" = "Integrations" ]; then
50+
ext="apk"
51+
else abort unreachable; fi
52+
local dir=${src%/*}
53+
dir=${TEMP_DIR}/${dir,,}-rv
54+
[ -d "$dir" ] || mkdir "$dir"
55+
56+
local rv_rel="https://api.github.com/repos/${src}/releases/"
57+
if [ "$ver" ]; then rv_rel+="tags/${ver}"; else rv_rel+="latest"; fi
58+
59+
local resp asset url name file
60+
resp=$(gh_req "$rv_rel" -) || return 1
61+
asset=$(jq -e -r ".assets[] | select(.name | endswith(\"$ext\"))" <<<"$resp") || return 1
62+
url=$(jq -r .url <<<"$asset")
63+
name=$(jq -r .name <<<"$asset")
64+
file="${dir}/${name}"
65+
[ -f "$file" ] || REBUILD=true
66+
67+
echo "$tag: $(cut -d/ -f5 <<<"$url")/${name} " >>"$dir/changelog.md"
68+
gh_dl "$file" "$url" >&2 || return 1
69+
echo -n "$file "
70+
if [ "$tag" = "Patches" ]; then
71+
local tag_name
72+
tag_name=$(jq -r '.tag_name' <<<"$resp")
73+
name="patches-${tag_name}.json"
74+
file="${dir}/${name}"
75+
url=$(jq -e -r '.assets[] | select(.name | endswith("json")) | .url' <<<"$resp") || return 1
76+
gh_dl "$file" "$url" >&2 || return 1
77+
echo -n "$file "
78+
echo -e "[Changelog](https://github.com/${src}/releases/tag/${tag_name})\n" >>"$dir/changelog.md"
79+
fi
80+
done
81+
echo
8882
}
8983

9084
get_prebuilts() {
@@ -98,10 +92,10 @@ get_prebuilts() {
9892
HTMLQ="${BIN_DIR}/htmlq/htmlq-x86_64"
9993
fi
10094
mkdir -p ${MODULE_TEMPLATE_DIR}/bin/arm64 ${MODULE_TEMPLATE_DIR}/bin/arm ${MODULE_TEMPLATE_DIR}/bin/x86 ${MODULE_TEMPLATE_DIR}/bin/x64
101-
dl_if_dne "${MODULE_TEMPLATE_DIR}/bin/arm64/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-arm64-v8a"
102-
dl_if_dne "${MODULE_TEMPLATE_DIR}/bin/arm/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-armeabi-v7a"
103-
dl_if_dne "${MODULE_TEMPLATE_DIR}/bin/x86/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86"
104-
dl_if_dne "${MODULE_TEMPLATE_DIR}/bin/x64/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86_64"
95+
gh_dl "${MODULE_TEMPLATE_DIR}/bin/arm64/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-arm64-v8a"
96+
gh_dl "${MODULE_TEMPLATE_DIR}/bin/arm/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-armeabi-v7a"
97+
gh_dl "${MODULE_TEMPLATE_DIR}/bin/x86/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86"
98+
gh_dl "${MODULE_TEMPLATE_DIR}/bin/x64/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86_64"
10599
}
106100

107101
config_update() {
@@ -125,7 +119,8 @@ config_update() {
125119
fi
126120
else
127121
sources[$PATCHES_SRC]=0
128-
if ! last_patches_url=$(gh_req "https://api.github.com/repos/${PATCHES_SRC}/releases/latest" - 2>&1 | json_get 'browser_download_url' | grep -E '\.jar$'); then
122+
if ! last_patches_url=$(gh_req "https://api.github.com/repos/${PATCHES_SRC}/releases/latest" - \
123+
| jq -e -r '.assets[] | select(.name | endswith("jar")) | .name'); then
129124
abort oops
130125
fi
131126
last_patches=${last_patches_url##*/}
@@ -146,21 +141,29 @@ config_update() {
146141
}
147142

148143
_req() {
149-
if [ "$2" = - ]; then
150-
wget -nv -O "$2" --header="$3" "$1"
144+
local ip="$1" op="$2"
145+
shift 2
146+
if [ "$op" = - ]; then
147+
wget -nv -O "$op" "$@" "$ip"
151148
else
152149
local dlp
153-
dlp="$(dirname "$2")/tmp.$(basename "$2")"
150+
dlp="$(dirname "$op")/tmp.$(basename "$op")"
154151
if [ -f "$dlp" ]; then
155152
while [ -f "$dlp" ]; do sleep 1; done
156153
return
157154
fi
158-
wget -nv -O "$dlp" --header="$3" "$1" || return 1
159-
mv -f "$dlp" "$2"
155+
wget -nv -O "$dlp" "$@" "$ip" || return 1
156+
mv -f "$dlp" "$op"
157+
fi
158+
}
159+
req() { _req "$1" "$2" --header="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"; }
160+
gh_req() { _req "$1" "$2" --header="$GH_HEADER"; }
161+
gh_dl() {
162+
if [ ! -f "$1" ]; then
163+
pr "Getting '$1' from '$2'"
164+
_req "$2" "$1" --header="$GH_HEADER" --header="Accept: application/octet-stream"
160165
fi
161166
}
162-
req() { _req "$1" "$2" "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"; }
163-
gh_req() { _req "$1" "$2" "$GH_HEADER"; }
164167

165168
log() { echo -e "$1 " >>"build.md"; }
166169
get_largest_ver() {
@@ -180,7 +183,7 @@ get_patch_last_supported_ver() {
180183
exc_sel=$(list_args "$3" | sed 's/.*/\.name != &/' | paste -sd '~' | sed 's/~/ and /g' || :)
181184
inc_sel=${inc_sel:-false}
182185
if [ "$4" = false ]; then inc_sel="${inc_sel} or .use==true"; fi
183-
if ! vs=$(jq -r ".[]
186+
if ! vs=$(jq -e -r ".[]
184187
| select(.compatiblePackages // [] | .[] | .name==\"${1}\")
185188
| select(${inc_sel})
186189
| select(${exc_sel:-true})
@@ -190,17 +193,6 @@ get_patch_last_supported_ver() {
190193
tr -d ' ,\t[]"' <<<"$vs" | sort -u | grep -v '^$' | get_largest_ver || :
191194
}
192195

193-
dl_if_dne() {
194-
[ "${DRYRUN:-}" ] && {
195-
: >"$1"
196-
return 0
197-
}
198-
if [ ! -f "$1" ]; then
199-
pr "Getting '$1' from '$2'"
200-
req "$2" "$1"
201-
fi
202-
}
203-
204196
isoneof() {
205197
local i=$1 v
206198
shift
@@ -212,30 +204,30 @@ isoneof() {
212204
dl_apkmirror() {
213205
local url=$1 version=${2// /-} output=$3 arch=$4 dpi=$5 apkorbundle=APK
214206
if [ "$arch" = "arm-v7a" ]; then arch="armeabi-v7a"; fi
215-
[ "${DRYRUN:-}" ] && {
216-
: >"$output"
217-
return 0
218-
}
219207
local apparch resp node app_table dlurl=""
220208
if [ "$arch" = all ]; then
221209
apparch=(universal noarch 'arm64-v8a + armeabi-v7a')
222210
else apparch=("$arch" universal noarch 'arm64-v8a + armeabi-v7a'); fi
223211
url="${url}/${url##*/}-${version//./-}-release/"
224212
resp=$(req "$url" -) || return 1
225-
for ((n = 1; n < 40; n++)); do
226-
node=$($HTMLQ "div.table-row.headerFont:nth-last-child($n)" -r "span:nth-child(n+3)" <<<"$resp")
227-
if [ -z "$node" ]; then break; fi
228-
app_table=$($HTMLQ --text --ignore-whitespace <<<"$node")
229-
if [ "$(sed -n 3p <<<"$app_table")" = "$apkorbundle" ] && { [ "$apkorbundle" = BUNDLE ] ||
230-
{ [ "$apkorbundle" = APK ] && [ "$(sed -n 6p <<<"$app_table")" = "$dpi" ] &&
231-
isoneof "$(sed -n 4p <<<"$app_table")" "${apparch[@]}"; }; }; then
232-
dlurl=$($HTMLQ --base https://www.apkmirror.com --attribute href "div:nth-child(1) > a:nth-child(1)" <<<"$node")
233-
break
234-
fi
235-
done
236-
[ -z "$dlurl" ] && return 1
237-
url=$(req "$dlurl" - | $HTMLQ --base https://www.apkmirror.com --attribute href "a.btn") || return 1
238-
if [ "$apkorbundle" = BUNDLE ] && [[ "$url" != *"&forcebaseapk=true" ]]; then url="${url}&forcebaseapk=true"; fi
213+
node=$($HTMLQ "div.table-row.headerFont:nth-last-child(1)" -r "span:nth-child(n+3)" <<<"$resp")
214+
if [ "$node" ]; then
215+
for ((n = 1; n < 40; n++)); do
216+
node=$($HTMLQ "div.table-row.headerFont:nth-last-child($n)" -r "span:nth-child(n+3)" <<<"$resp")
217+
if [ -z "$node" ]; then break; fi
218+
app_table=$($HTMLQ --text --ignore-whitespace <<<"$node")
219+
if [ "$(sed -n 3p <<<"$app_table")" = "$apkorbundle" ] && { [ "$apkorbundle" = BUNDLE ] \
220+
|| { [ "$apkorbundle" = APK ] && [ "$(sed -n 6p <<<"$app_table")" = "$dpi" ] \
221+
&& isoneof "$(sed -n 4p <<<"$app_table")" "${apparch[@]}"; }; }; then
222+
dlurl=$($HTMLQ --base https://www.apkmirror.com --attribute href "div:nth-child(1) > a:nth-child(1)" <<<"$node")
223+
break
224+
fi
225+
done
226+
[ -z "$dlurl" ] && return 1
227+
resp=$(req "$dlurl" -)
228+
fi
229+
url=$(echo "$resp" | $HTMLQ --base https://www.apkmirror.com --attribute href "a.btn") || return 1
230+
if [ "$apkorbundle" = BUNDLE ] && [[ $url != *"&forcebaseapk=true" ]]; then url="${url}&forcebaseapk=true"; fi
239231
url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "span > a[rel = nofollow]") || return 1
240232
req "$url" "$output"
241233
}
@@ -310,15 +302,11 @@ get_archive_pkg_name() { echo "$__ARCHIVE_PKG_NAME__"; }
310302

311303
patch_apk() {
312304
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
313-
local cmd="java -jar $rv_cli_jar patch $stock_input -p -o $patched_apk -b $rv_patches_jar \
314-
--keystore=ks.keystore --keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --alias=jhc $patcher_args --options=options.json"
305+
local cmd="java -jar $rv_cli_jar patch $stock_input -p -o $patched_apk -b $rv_patches_jar $patcher_args --keystore=ks.keystore \
306+
--keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc --options=options.json"
315307
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${AAPT2}"; fi
316308
pr "$cmd"
317-
if [ "${DRYRUN:-}" = true ]; then
318-
cp -f "$stock_input" "$patched_apk"
319-
else
320-
eval "$cmd"
321-
fi
309+
eval "$cmd"
322310
[ -f "$patched_apk" ]
323311
}
324312

@@ -471,7 +459,7 @@ build_rv() {
471459
"${app_name} ${args[rv_brand]}" \
472460
"$version" \
473461
"${app_name} ${args[rv_brand]} Magisk module" \
474-
"https://raw.githubusercontent.com/${GITHUB_REPOSITORY:-}/update/${upj}" \
462+
"https://raw.githubusercontent.com/${GITHUB_REPOSITORY-}/update/${upj}" \
475463
"$base_template"
476464

477465
local module_output="${app_name_l}-${rv_brand_f}-magisk-v${version_f}-${arch_f}.zip"

0 commit comments

Comments
 (0)