deb-update.bash: run dnf autoremove twice too

This commit is contained in:
Aminda Suomalainen 2022-09-07 20:14:44 +03:00
parent 3a26251f0c
commit 9a35f15e9f
Signed by: Mikaela
SSH Key Fingerprint: SHA256:y2OpGEbett3Fqn8XFrP0X4mWfCVKf4rWkxERzqPY81U

View File

@ -48,10 +48,13 @@ if hash dnf 2>/dev/null; then
# say nothing to do or do nothing if mirrors haven't updated. # say nothing to do or do nothing if mirrors haven't updated.
dnf check-update -y dnf check-update -y
# potentially unsafe first time, I am not sure if this is concern outside of Debian/Ubuntu though
dnf "$@" autoremove
# If arguments like -y are passed to the script, they become "$@" # If arguments like -y are passed to the script, they become "$@"
dnf "$@" upgrade dnf "$@" upgrade
# potentially unsafe # potentially unsafe, see a few lines above and the apt-get section
dnf "$@" autoremove dnf "$@" autoremove
fi fi