diff --git a/config/updateall/scripts/80-nvim b/config/updateall/scripts/80-nvim index af53901..d5b6277 100755 --- a/config/updateall/scripts/80-nvim +++ b/config/updateall/scripts/80-nvim @@ -1,3 +1,18 @@ #!/bin/sh -nvim +PackerUpdate +update_plugin() { + cd "$1" || return + printf 'Updating plugin \033[1m%s\033[0m...\n' "$(echo "$1" | sed 's|/start||')" + git pull +} + +cd ~/.local/share/nvim/site/pack || exit + +for i in */start/*; do + while [ "$(jobs -p | wc -l)" -ge 4 ]; do + sleep 1 + done + update_plugin "$i" & +done + +wait