Compare commits

..

3 Commits

Author SHA1 Message Date
d8e73040bc Merge branch 'debian' of ssh://git.szimnau.de:222/fabian/sync into debian 2024-04-01 00:14:47 +02:00
bb09061c3b improved automatic updates via executeAndNotify to enable fire-and-forget 2024-03-31 23:59:16 +02:00
08fbd0beb9 new function to update debian based systems
improved automatic updates via executeAndNotify to enable fire-and-forget
2024-03-31 23:58:19 +02:00

View File

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