summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-12-31 20:07:10 +0100
committerAki <please@ignore.pl>2023-12-31 20:07:10 +0100
commit9a0b52d442959235ea6ed919d367aebb56e2aef1 (patch)
tree14b7dc4ac79b62f47f1269977df282ddd48fd26b
parent8eecae65bb077d6e89935066ec5d4fbb060168cc (diff)
downloadmirror-9a0b52d442959235ea6ed919d367aebb56e2aef1.zip
mirror-9a0b52d442959235ea6ed919d367aebb56e2aef1.tar.gz
mirror-9a0b52d442959235ea6ed919d367aebb56e2aef1.tar.bz2
Hot-fixed failures due to refused connections
-rw-r--r--mirror.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/mirror.sh b/mirror.sh
index 49a3057..d3bb652 100644
--- a/mirror.sh
+++ b/mirror.sh
@@ -42,15 +42,10 @@ done
shift $(( ${OPTIND} - 1 ))
list="${1:-repositories.list}"
test -f "${list}" || exit 1
-pids=
-while read repo; do
- _update "${repo}" &
- pids="${pids} $!"
-done <"${list}"
failed=0
-for pid in ${pids}; do
- if ! wait ${pid}; then
+while read repo; do
+ if ! _update "${repo}"; then # TODO: Parallelize this without DDOSing the hosts
failed=1
fi
-done
+done <"${list}"
exit ${failed}