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)"
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user