diff --git a/build.sh b/build.sh index bdb0f89f13..58e2fcd8e8 100755 --- a/build.sh +++ b/build.sh @@ -73,7 +73,10 @@ for table_name in $(toml_get_table_names); do t=$(toml_get_table "$table_name") enabled=$(toml_get "$t" enabled) && vtf "$enabled" "enabled" || enabled=true if [ "$enabled" = false ]; then continue; fi - if ((idx >= PARALLEL_JOBS)); then wait -n; fi + if ((idx >= PARALLEL_JOBS)); then + wait -n + idx=$((idx - 1)) + fi declare -A app_args patches_src=$(toml_get "$t" patches-source) || patches_src=$DEF_PATCHES_SRC @@ -124,10 +127,6 @@ for table_name in $(toml_get_table_names); do app_args[uptodown_dlurl]=${app_args[uptodown_dlurl]%/} app_args[dl_from]=uptodown } || app_args[uptodown_dlurl]="" - app_args[apkmonk_dlurl]=$(toml_get "$t" apkmonk-dlurl) && { - app_args[apkmonk_dlurl]=${app_args[apkmonk_dlurl]%/} - app_args[dl_from]=apkmonk - } || app_args[apkmonk_dlurl]="" app_args[apkmirror_dlurl]=$(toml_get "$t" apkmirror-dlurl) && { app_args[apkmirror_dlurl]=${app_args[apkmirror_dlurl]%/} app_args[dl_from]=apkmirror @@ -136,7 +135,7 @@ for table_name in $(toml_get_table_names); do app_args[archive_dlurl]=${app_args[archive_dlurl]%/} app_args[dl_from]=archive } || app_args[archive_dlurl]="" - if [ -z "${app_args[dl_from]-}" ]; then abort "ERROR: no 'apkmirror_dlurl', 'uptodown_dlurl' or 'apkmonk_dlurl' option was set for '$table_name'."; fi + if [ -z "${app_args[dl_from]-}" ]; then abort "ERROR: no 'apkmirror_dlurl', 'uptodown_dlurl' or 'archive_dlurl' option was set for '$table_name'."; fi app_args[arch]=$(toml_get "$t" arch) || app_args[arch]="all" if [ "${app_args[arch]}" != "both" ] && [ "${app_args[arch]}" != "all" ] && [[ ${app_args[arch]} != "arm64-v8a"* ]] && [[ ${app_args[arch]} != "arm-v7a"* ]]; then abort "wrong arch '${app_args[arch]}' for '$table_name'" @@ -146,18 +145,28 @@ for table_name in $(toml_get_table_names); do app_args[dpi]=$(toml_get "$t" apkmirror-dpi) || app_args[dpi]="nodpi" table_name_f=${table_name,,} table_name_f=${table_name_f// /-} - app_args[module_prop_name]=$(toml_get "$t" module-prop-name) || app_args[module_prop_name]="${table_name_f}-jhc" + app_args[module_prop_name]=$(toml_get "$t" module-prop-name) || { + app_args[module_prop_name]="${table_name_f}-jhc" + if [ "${app_args[arch]}" = "arm64-v8a" ]; then + app_args[module_prop_name]="${app_args[module_prop_name]}-arm64" + elif [ "${app_args[arch]}" = "arm-v7a" ]; then + app_args[module_prop_name]="${app_args[module_prop_name]}-arm" + fi + } if [ "${app_args[arch]}" = both ]; then app_args[table]="$table_name (arm64-v8a)" - app_args[module_prop_name]="${app_args[module_prop_name]}-arm64" app_args[arch]="arm64-v8a" + app_args[module_prop_name]="${app_args[module_prop_name]}-arm64" idx=$((idx + 1)) build_rv "$(declare -p app_args)" & app_args[table]="$table_name (arm-v7a)" - app_args[module_prop_name]="${app_args[module_prop_name]}-arm" app_args[arch]="arm-v7a" - if ((idx >= PARALLEL_JOBS)); then wait -n; fi + app_args[module_prop_name]="${app_args[module_prop_name]}-arm" + if ((idx >= PARALLEL_JOBS)); then + wait -n + idx=$((idx - 1)) + fi idx=$((idx + 1)) build_rv "$(declare -p app_args)" & else @@ -171,7 +180,7 @@ if [ -z "$(ls -A1 ${BUILD_DIR})" ]; then abort "All builds failed."; fi log "\nInstall [Microg](https://github.com/ReVanced/GmsCore/releases) for non-root YouTube and YT Music APKs" log "Use [zygisk-detach](https://github.com/j-hc/zygisk-detach) to detach root ReVanced YouTube and YT Music from Play Store" -log "\n[ReVanced-XteNded](https://github.com/smmahbubhossain/ReVanced-XteNded)\n" +log "\n[revanced-magisk-module](https://github.com/iamsmmh/revanced-magisk-module)\n" log "$(cat $TEMP_DIR/*-rv/changelog.md)" SKIPPED=$(cat $TEMP_DIR/skipped 2>/dev/null || :)