From 832e4fc3ce830659e6de5f2810028c6c2ad48058 Mon Sep 17 00:00:00 2001 From: Alkindi Date: Sat, 5 Sep 2020 21:27:55 +0200 Subject: [PATCH] feat: verbose update log --- 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 7d856ee..440b4e2 100755 --- a/scripts/update_plugin.sh +++ b/scripts/update_plugin.sh @@ -21,15 +21,16 @@ pull_changes() { local plugin="$1" local plugin_path="$(plugin_path_helper "$plugin")" cd "$plugin_path" && - GIT_TERMINAL_PROMPT=0 git pull && + GIT_TERMINAL_PROMPT=0 git fetch && + GIT_TERMINAL_PROMPT=0 git log --pretty="%as %h %cr %s" ..origin/master && + GIT_TERMINAL_PROMPT=0 git pull > /dev/null 2>&1 && GIT_TERMINAL_PROMPT=0 git submodule update --init --recursive } update() { local plugin="$1" - $(pull_changes "$plugin" > /dev/null 2>&1) && - echo_ok " \"$plugin\" update success" || - echo_err " \"$plugin\" update fail" + echo_ok "Updating $plugin" + pull_changes "$plugin" || echo_err "update fail" } update_all() {