From 9e082ff1b3fad5597c45f7128ce9d932b3643f38 Mon Sep 17 00:00:00 2001 From: Graham McGregor Date: Sat, 12 Nov 2016 15:12:50 -0500 Subject: [PATCH] Update plugins in parallel --- scripts/update_plugin.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/update_plugin.sh b/scripts/update_plugin.sh index d923d83..4fc44d2 100755 --- a/scripts/update_plugin.sh +++ b/scripts/update_plugin.sh @@ -27,7 +27,6 @@ pull_changes() { update() { local plugin="$1" - echo_ok "Updating \"$plugin\"" $(pull_changes "$plugin" > /dev/null 2>&1) && echo_ok " \"$plugin\" update success" || echo_err " \"$plugin\" update fail" @@ -41,9 +40,10 @@ update_all() { local plugin_name="$(plugin_name_helper "$plugin")" # updating only installed plugins if plugin_already_installed "$plugin_name"; then - update "$plugin_name" + update "$plugin_name" & fi done + wait } update_plugins() { @@ -51,11 +51,12 @@ update_plugins() { for plugin in $plugins; do local plugin_name="$(plugin_name_helper "$plugin")" if plugin_already_installed "$plugin_name"; then - update "$plugin_name" + update "$plugin_name" & else - echo_err "$plugin_name not installed!" + echo_err "$plugin_name not installed!" & fi done + wait } main() {