mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-04-29 22:24:34 +02:00
update error handling
This commit is contained in:
parent
45bf672667
commit
f25b6c8da4
4
build.sh
4
build.sh
@ -50,7 +50,9 @@ java --version >/dev/null || abort "\`openjdk 17\` is not installed. install it
|
||||
zip --version >/dev/null || abort "\`zip\` is not installed. install it with 'apt install zip' or equivalent"
|
||||
# ----------------
|
||||
rm -rf revanced-magisk/bin/*/tmp.*
|
||||
: >"$TEMP_DIR"/*-rv/changelog.md || :
|
||||
if [ "$(echo "$TEMP_DIR"/*-rv/changelog.md)" ]; then
|
||||
: >"$TEMP_DIR"/*-rv/changelog.md || :
|
||||
fi
|
||||
|
||||
get_prebuilts
|
||||
|
||||
|
11
utils.sh
11
utils.sh
@ -80,13 +80,14 @@ get_rv_prebuilts() {
|
||||
if [ "$tag" = "Integrations" ]; then integs_file=$file; fi
|
||||
echo "$tag: $(cut -d/ -f1 <<<"$src")/${name} " >>"${cl_dir}/changelog.md"
|
||||
else
|
||||
local for_err=$file
|
||||
if [ "$ver" = "latest" ]; then
|
||||
file=$(grep -v dev <<<"$file" | head -1)
|
||||
else file=$(grep "${ver#v}" <<<"$file" | head -1); fi
|
||||
if [ -z "$file" ]; then abort "filter fail: '$for_err' with '$ver'"; fi
|
||||
name=$(basename "$file")
|
||||
tag_name=$(cut -d'-' -f3- <<<"$name")
|
||||
tag_name=v${tag_name%.*}
|
||||
if [ "$tag_name" = "v" ]; then abort "wrong ver"; fi
|
||||
fi
|
||||
|
||||
echo -n "$file "
|
||||
@ -543,9 +544,11 @@ build_rv() {
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if ! patch_apk "$stock_apk" "$patched_apk" "${patcher_args[*]}" "${args[cli]}" "${args[ptjar]}"; then
|
||||
epr "Building '${table}' failed!"
|
||||
return 0
|
||||
if [ "${NORB:-}" != true ] || [ ! -f "$patched_apk" ]; then
|
||||
if ! patch_apk "$stock_apk" "$patched_apk" "${patcher_args[*]}" "${args[cli]}" "${args[ptjar]}"; then
|
||||
epr "Building '${table}' failed!"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
if [ "$build_mode" = apk ]; then
|
||||
local apk_output="${BUILD_DIR}/${app_name_l}-${rv_brand_f}-v${version_f}-${arch_f}.apk"
|
||||
|
Loading…
x
Reference in New Issue
Block a user