mirror of
https://codeberg.org/hyperreal/bin
synced 2025-01-18 16:23:43 +01:00
Add check-updates
This commit is contained in:
parent
43486196ad
commit
923fd9955a
18
check-updates
Executable file
18
check-updates
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if ! sudo dnf check-update >/dev/null; then
|
||||||
|
echo "Error checking for DNF updates"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! flatpak remote-ls --updates >/dev/null; then
|
||||||
|
echo "Error checking for Flatpak updates"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DNF_UPDATES=$(sudo dnf check-update | wc -l)
|
||||||
|
FLATPAK_UPDATES=$(flatpak remote-ls --updates | wc -l)
|
||||||
|
|
||||||
|
echo "[ DNF: $DNF_UPDATES ] [ Flatpak: $FLATPAK_UPDATES ]"
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user