Use GNU Parallel if available to speed up updating

This commit is contained in:
Adam Goldsmith 2023-04-15 21:51:47 -04:00
parent 9d2d5f568e
commit 9df34be4f7

14
dup
View File

@ -146,10 +146,16 @@ then
targets="$(find * -maxdepth 0 -type d -execdir test -e "{}/.git" \; -print)" targets="$(find * -maxdepth 0 -type d -execdir test -e "{}/.git" \; -print)"
for dir in $targets if type parallel &> /dev/null
do then
do_pull_maybe_quiet "$dir" export -f do_pull do_pull_maybe_quiet
done parallel --max-args 1 do_pull_maybe_quiet ::: $targets
else
for dir in $targets
do
do_pull_maybe_quiet "$dir"
done
fi
maybe_stow $targets maybe_stow $targets
fi fi