From 5acb1dfb07505eb23c0a4235ab36a0472073fa85 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Wed, 3 Aug 2022 09:41:20 +0300 Subject: [PATCH] Include work laptop configuration in update alias --- home/.config/zsh/03-aliases.zsh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/home/.config/zsh/03-aliases.zsh b/home/.config/zsh/03-aliases.zsh index 8a3e493..a74e1d7 100644 --- a/home/.config/zsh/03-aliases.zsh +++ b/home/.config/zsh/03-aliases.zsh @@ -141,7 +141,12 @@ passync() { pass git pull && pass git push && updatesecrets } update() { all() { + {%@@ if profile == "Moria" or profile == 'Mirkwood' @@%} paru + {%@@ endif @@%} + {%@@ if profile == "mko-laptop" @@%} + apt + {%@@ endif @@%} {%@@ if profile == "Moria" @@%} repo docker-update @@ -174,8 +179,12 @@ update() { docker system prune -af --volumes } + apt() { + sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y + } + if [ $# -eq 0 ]; then - 1=base + 1=all fi case "$1" in @@ -185,14 +194,21 @@ update() { plugins) plugins ;; + {%@@ if profile == "Moria" @@%} docker) docker-update ;; repo) repo ;; + {%@@ endif @@%} + {%@@ if profile == "mko-laptop" @@%} + apt) + apt + ;; + {%@@ endif @@%} *) - paru + all ;; esac }