From d691b3e16ed7c5e3ffaa8f1aa328cdfa788e4f5a Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Tue, 16 Apr 2019 14:20:13 +0200 Subject: [PATCH 1/2] Fix update --- zsh/bin/update | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/bin/update b/zsh/bin/update index afd9b8b..344ad24 100755 --- a/zsh/bin/update +++ b/zsh/bin/update @@ -71,7 +71,8 @@ update-system() { sudoresult=$(sudo -nv 2>&1) if [ $? -eq 0 ]; then - # Nothing to do + echo "\033[33;1m=== You are not a sudoer, skipping system update... ===\033[0m" + return 1 elif echo $sudoresult | grep -q '^sudo:'; then echo "\033[32;1m=== Starting system update, please enter your password ===\033[0m" sudo true From cc07228c37dc8062664c307affe81247af1e65c3 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Tue, 16 Apr 2019 14:48:47 +0200 Subject: [PATCH 2/2] yay -Syu yay -Syua --- zsh/bin/update | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/bin/update b/zsh/bin/update index 344ad24..58183e6 100755 --- a/zsh/bin/update +++ b/zsh/bin/update @@ -104,6 +104,7 @@ update-system() { command -v yay > /dev/null 2>&1 if [ $? -eq 0 ]; then + yay -Syu --noconfirm yay -Syua --noconfirm else command -v pacman > /dev/null 2>&1