update parallelization

This commit is contained in:
j-hc 2022-12-24 00:30:56 +03:00
parent 031a4a1500
commit 2f31c83f15
5 changed files with 6 additions and 11 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@
/build
build.md
/test
cmpr

View File

@ -47,15 +47,11 @@ build_functions=(
)
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
eval "$f &"
while [ "$(jobs -r | wc -l)" -ge 3 ]; do
sleep 5
done
done
wait
rm -rf temp/tmp.*

Binary file not shown.

Binary file not shown.

View File

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