From 5373c106d2bcea00cf506b5bca1701096bbd18d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoran=20Oluji=C4=87?= Date: Sat, 7 Sep 2024 04:04:52 +0200 Subject: [PATCH] Support for apt and ubuntu in CheckUpdates script (#230) Co-authored-by: Zoran Olujic --- scripts/checkUpdates.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/checkUpdates.sh b/scripts/checkUpdates.sh index 69ca9f9..8a08b09 100755 --- a/scripts/checkUpdates.sh +++ b/scripts/checkUpdates.sh @@ -5,10 +5,18 @@ check_arch_updates() { echo "$result" } +check_ubuntu_updates() { + result=$(apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst) + echo "$result" +} + case "$1" in -arch) check_arch_updates ;; +-ubuntu) + check_ubuntu_updates + ;; *) echo "0" ;;