feat: verbose update log

This commit is contained in:
Alkindi 2020-09-05 21:27:55 +02:00 committed by Samir DAHAN
parent 60a36d6f7a
commit 832e4fc3ce

View File

@ -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() {