From 0156d2d8c177ebffe12e71c10115a1aad56c3fa3 Mon Sep 17 00:00:00 2001 From: Cameron Smith <114649266+smathles@users.noreply.github.com> Date: Wed, 11 Sep 2024 19:57:05 +1000 Subject: [PATCH] Add support for dnf and fedora in checkUpdates.sh (#249) * Add support for dnf and fedora in checkUpdates.sh * commit changes to updates + bar * Remove antiquated padding shenanigan <3 Co-authored-by: Jas Singh --------- Co-authored-by: Jas Singh --- scripts/checkUpdates.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/checkUpdates.sh b/scripts/checkUpdates.sh index 8a08b09..929023b 100755 --- a/scripts/checkUpdates.sh +++ b/scripts/checkUpdates.sh @@ -10,6 +10,11 @@ check_ubuntu_updates() { echo "$result" } +check_fedora_updates() { + result=$(dnf check-update -q | grep -v '^Loaded plugins' | grep -v '^No match for' | wc -l) + echo "$result" +} + case "$1" in -arch) check_arch_updates @@ -17,6 +22,9 @@ case "$1" in -ubuntu) check_ubuntu_updates ;; +-fedora) + check_fedora_updates + ;; *) echo "0" ;;