bin/check-updates
2024-12-22 12:51:08 -06:00

19 lines
401 B
Bash
Executable File

#!/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