update parallelizing

This commit is contained in:
j-hc
2022-12-19 23:38:55 +03:00
parent c3616e3e16
commit 2e7d4afc5f
2 changed files with 22 additions and 12 deletions

View File

@ -37,20 +37,28 @@ if ((COMPRESSION_LEVEL > 9)) || ((COMPRESSION_LEVEL < 1)); then
abort "COMPRESSION_LEVEL must be between 1 and 9" abort "COMPRESSION_LEVEL must be between 1 and 9"
fi fi
log "**App Versions:**" build_functions=(
build_youtube & build_youtube build_music
build_music & build_twitter build_reddit
build_twitter & build_twitch build_tiktok
build_reddit & build_spotify build_ticktick
build_twitch & build_warn_wetter build_backdrops
build_tiktok & build_windy
build_spotify & )
build_ticktick &
build_warn_wetter &
build_backdrops &
build_windy &
log "**App Versions:**"
idx=0
for f in "${build_functions[@]}"; do
ret=$($f &)
if ! ((idx % 2)); then
wait
fi
if [[ $ret != 2 ]]; then
idx=$((idx + 1))
fi
done
wait wait
rm -rf temp/tmp.*
if [ "$BUILD_MINDETACH_MODULE" = true ]; then if [ "$BUILD_MINDETACH_MODULE" = true ]; then
echo "Building mindetach module" echo "Building mindetach module"

View File

@ -144,6 +144,7 @@ build_rv() {
if [ "${args[apkmirror_dlurl]:-}" ] && [ "${args[regexp]:-}" ]; then dl_from=apkmirror; else dl_from=uptodown; fi if [ "${args[apkmirror_dlurl]:-}" ] && [ "${args[regexp]:-}" ]; then dl_from=apkmirror; else dl_from=uptodown; fi
if [ "$mode_arg" = none ]; then if [ "$mode_arg" = none ]; then
echo 2
return return
elif [ "$mode_arg" = module ]; then elif [ "$mode_arg" = module ]; then
build_mode_arr=(module) build_mode_arr=(module)
@ -153,6 +154,7 @@ build_rv() {
build_mode_arr=(apk module) build_mode_arr=(apk module)
else else
echo "ERROR: undefined build mode for ${args[app_name]}: '${mode_arg}'" echo "ERROR: undefined build mode for ${args[app_name]}: '${mode_arg}'"
echo 2
return return
fi fi