new function to update debian based systems
improved automatic updates via executeAndNotify to enable fire-and-forget
This commit is contained in:
parent
1952ece138
commit
e99b430ce8
@ -4,13 +4,18 @@
|
|||||||
updatePackages() {
|
updatePackages() {
|
||||||
noconfirm=
|
noconfirm=
|
||||||
if [[ $1 == "-y" ]]; then
|
if [[ $1 == "-y" ]]; then
|
||||||
noconfirm="--no-confirm";
|
noconfirm="--assume-yes"
|
||||||
fi
|
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() {
|
doUpdatePackages() {
|
||||||
pamac update $1;
|
sudo apt update;
|
||||||
pamac remove --orphans --cascade $1;
|
sudo apt ${2}upgrade $1;
|
||||||
|
sudo apt autoremove $1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user