From 8b50039f98e0fe80680a45e34a6781b3442be4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 12 Jul 2022 10:48:59 +0200 Subject: [PATCH] Add dnf support to update-all-packages --- symlinks/bin/update-all-packages | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/symlinks/bin/update-all-packages b/symlinks/bin/update-all-packages index 2d696da..fbc896b 100755 --- a/symlinks/bin/update-all-packages +++ b/symlinks/bin/update-all-packages @@ -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