From 08fbd0beb94f82b7927515777716134bcef6e75e Mon Sep 17 00:00:00 2001 From: fabian Date: Sun, 31 Mar 2024 23:54:05 +0200 Subject: [PATCH] new function to update debian based systems improved automatic updates via executeAndNotify to enable fire-and-forget --- home_external/.bash_aliases_branched | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/home_external/.bash_aliases_branched b/home_external/.bash_aliases_branched index c2539e2..47bfa4b 100644 --- a/home_external/.bash_aliases_branched +++ b/home_external/.bash_aliases_branched @@ -4,13 +4,18 @@ updatePackages() { noconfirm= if [[ $1 == "-y" ]]; then - noconfirm="--no-confirm"; + noconfirm="--assume-yes" fi - executeAndNotify "doUpdatePackages $noconfirm" "packages updated" "package update failed"; + full= + if [[ $2 == "--full" ]]; then + full="full-" + fi + executeAndNotify "doUpdatePackages $noconfirm $full" "system updated" "system update failed"; } doUpdatePackages() { - pamac update $1; - pamac remove --orphans --cascade $1; + sudo apt update; + sudo apt ${2}upgrade $1; + sudo apt autoremove $1; }