Skip to content

Commit 9e082ff

Browse files
committed
Update plugins in parallel
1 parent b4c8988 commit 9e082ff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/update_plugin.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ pull_changes() {
2727

2828
update() {
2929
local plugin="$1"
30-
echo_ok "Updating \"$plugin\""
3130
$(pull_changes "$plugin" > /dev/null 2>&1) &&
3231
echo_ok " \"$plugin\" update success" ||
3332
echo_err " \"$plugin\" update fail"
@@ -41,21 +40,23 @@ update_all() {
4140
local plugin_name="$(plugin_name_helper "$plugin")"
4241
# updating only installed plugins
4342
if plugin_already_installed "$plugin_name"; then
44-
update "$plugin_name"
43+
update "$plugin_name" &
4544
fi
4645
done
46+
wait
4747
}
4848

4949
update_plugins() {
5050
local plugins="$*"
5151
for plugin in $plugins; do
5252
local plugin_name="$(plugin_name_helper "$plugin")"
5353
if plugin_already_installed "$plugin_name"; then
54-
update "$plugin_name"
54+
update "$plugin_name" &
5555
else
56-
echo_err "$plugin_name not installed!"
56+
echo_err "$plugin_name not installed!" &
5757
fi
5858
done
59+
wait
5960
}
6061

6162
main() {

0 commit comments

Comments
 (0)