sync/home_external/.bash_aliases_branched
fabian e99b430ce8 new function to update debian based systems
improved automatic updates via executeAndNotify to enable fire-and-forget
2024-03-31 23:54:05 +02:00

22 lines
387 B
Bash

#!/usr/bin/env bash
updatePackages() {
noconfirm=
if [[ $1 == "-y" ]]; then
noconfirm="--assume-yes"
fi
full=
if [[ $2 == "--full" ]]; then
full="full-"
fi
executeAndNotify "doUpdatePackages $noconfirm $full" "system updated" "system update failed";
}
doUpdatePackages() {
sudo apt update;
sudo apt ${2}upgrade $1;
sudo apt autoremove $1;
}