@@ -46,7 +46,8 @@ wpr() {
4646}
4747abort () {
4848 epr " ABORT: ${1-} "
49- exit 1
49+ rm -rf ./${TEMP_DIR} /* tmp.* ./${TEMP_DIR} /* /* tmp.* ./${TEMP_DIR} /* -temporary-files
50+ kill -n 9 0
5051}
5152java () { env -i java " $@ " ; }
5253
@@ -190,8 +191,8 @@ config_update() {
190191 else
191192 last_patches=$( gh_req " $rv_rel /tags/${PATCHES_VER} " -)
192193 fi
193- if ! last_patches=$( jq -e -r ' .assets[] | select(.name | endswith("asc") | not) | .name' <<< " $last_patches" ) ; then
194- abort oops
194+ if ! last_patches=$( jq -e -r ' .assets[] | select(.name | ( endswith("asc") or endswith("json") ) | not) | .name' <<< " $last_patches" ) ; then
195+ abort " config_update error: ' $last_patches ' "
195196 fi
196197 if [ " $last_patches " ]; then
197198 if ! OP=$( grep " ^Patches: ${PATCHES_SRC%%/* } /" build.md | grep -m1 " $last_patches " ) ; then
@@ -482,14 +483,9 @@ merge_splits() {
482483 cd " ${bundle} -zip" || abort
483484 zip -0rq " ${CWD} /${bundle} .zip" .
484485 )
485- # if building module, sign the merged apk properly
486- if isoneof " module" " ${build_mode_arr[@]} " ; then
487- patch_apk " ${bundle} .zip" " ${output} " " --exclusive" " ${args[cli]} " " ${args[ptjar]} "
488- local ret=$?
489- else
490- cp " ${bundle} .zip" " ${output} "
491- local ret=$?
492- fi
486+ # sign the merged apk properly
487+ patch_apk " ${bundle} .zip" " ${output} " " --exclusive" " ${args[cli]} " " ${args[ptjar]} "
488+ local ret=$?
493489 rm -r " ${bundle} -zip" " ${bundle} .zip" " ${bundle} .mzip" || :
494490 return $ret
495491}
@@ -816,7 +812,7 @@ build_rv() {
816812 for build_mode in " ${build_mode_arr[@]} " ; do
817813 patcher_args=(" ${p_patcher_args[@]} " )
818814 pr " Building '${table} ' in '$build_mode ' mode"
819- if [ -n " $microg_patch " ] || [ -f " ${stock_apk} .apkm " ] ; then
815+ if [ -n " $microg_patch " ]; then
820816 patched_apk=" ${TEMP_DIR} /${app_name_l} -${rv_brand_f} -${version_f} -${arch_f} -${build_mode} .apk"
821817 else
822818 patched_apk=" ${TEMP_DIR} /${app_name_l} -${rv_brand_f} -${version_f} -${arch_f} .apk"
0 commit comments