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 <jaskiratpal.singh@outlook.com>

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
Cameron Smith
2024-09-11 19:57:05 +10:00
committed by GitHub
parent af51aa838d
commit 0156d2d8c1

View File

@@ -10,6 +10,11 @@ check_ubuntu_updates() {
echo "$result" 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 case "$1" in
-arch) -arch)
check_arch_updates check_arch_updates
@@ -17,6 +22,9 @@ case "$1" in
-ubuntu) -ubuntu)
check_ubuntu_updates check_ubuntu_updates
;; ;;
-fedora)
check_fedora_updates
;;
*) *)
echo "0" echo "0"
;; ;;