Add dnf support to update-all-packages

main
Ensar Sarajčić 2022-07-12 10:48:59 +02:00
parent 642017d72b
commit 8b50039f98
1 changed files with 13 additions and 1 deletions

View File

@ -24,7 +24,7 @@ done
declare -A RUN=()
for command in "pacman" "apt" "flatpak" "gem" "nvim" "asdf" "brew" "pacman";
for command in "pacman" "apt" "dnf" "flatpak" "gem" "nvim" "asdf" "brew" "pacman";
do
echo $command
if type $command > /dev/null 2>&1
@ -76,6 +76,18 @@ then
sudo apt autoremove
fi
if [ "${RUN[dnf]}" = "1" ]
then
# Clear out orphans
sudo dnf autoremove
# Update dnf packages
sudo dnf update
# Clear out orphans
sudo dnf autoremove
fi
if [ "${RUN[flatpak]}" = "1" ]
then
# Clear out unused flatpak apps