fix crashes caused by using bundle apk

This commit is contained in:
j-hc 2023-06-27 13:18:51 +03:00
parent e6b1617e53
commit a299cb0882
No known key found for this signature in database
GPG Key ID: FCBF5E9C57092AD9

View File

@ -374,23 +374,23 @@ build_rv() {
local stock_bundle_apk="${TEMP_DIR}/${pkg_name}-${version_f}-${arch_f}-bundle.apk" local stock_bundle_apk="${TEMP_DIR}/${pkg_name}-${version_f}-${arch_f}-bundle.apk"
local is_bundle=false local is_bundle=false
if [ "$mode_arg" = module ] || [ "$mode_arg" = both ]; then # if [ "$mode_arg" = module ] || [ "$mode_arg" = both ]; then
if [ -f "$stock_bundle_apk" ]; then # if [ -f "$stock_bundle_apk" ]; then
is_bundle=true # is_bundle=true
elif [ "$dl_from" = apkmirror ]; then # elif [ "$dl_from" = apkmirror ]; then
pr "Downloading '${table}' bundle from APKMirror" # pr "Downloading '${table}' bundle from APKMirror"
if dl_apkmirror "${args[apkmirror_dlurl]}" "$version" "$stock_bundle_apk" BUNDLE "" ""; then # if dl_apkmirror "${args[apkmirror_dlurl]}" "$version" "$stock_bundle_apk" BUNDLE "" ""; then
if (($(stat -c%s "$stock_apk") - $(stat -c%s "$stock_bundle_apk") > 10000000)); then # if (($(stat -c%s "$stock_apk") - $(stat -c%s "$stock_bundle_apk") > 10000000)); then
pr "'${table}' bundle was downloaded successfully and will be used for the module" # pr "'${table}' bundle was downloaded successfully and will be used for the module"
is_bundle=true # is_bundle=true
else # else
pr "'${table}' bundle was downloaded but will not be used" # pr "'${table}' bundle was downloaded but will not be used"
fi # fi
else # else
pr "'${table}' bundle was not found" # pr "'${table}' bundle was not found"
fi # fi
fi # fi
fi # fi
if [ "$mode_arg" = module ]; then if [ "$mode_arg" = module ]; then
build_mode_arr=(module) build_mode_arr=(module)