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:
@@ -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"
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user