Use GNU Parallel if available to speed up updating
This commit is contained in:
parent
9d2d5f568e
commit
9df34be4f7
14
dup
14
dup
@ -146,10 +146,16 @@ then
|
||||
|
||||
targets="$(find * -maxdepth 0 -type d -execdir test -e "{}/.git" \; -print)"
|
||||
|
||||
for dir in $targets
|
||||
do
|
||||
do_pull_maybe_quiet "$dir"
|
||||
done
|
||||
if type parallel &> /dev/null
|
||||
then
|
||||
export -f do_pull do_pull_maybe_quiet
|
||||
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
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user