From bb9012599ca80c957becf7af188f531ae98188ea Mon Sep 17 00:00:00 2001 From: Daniele Fucini Date: Thu, 9 Jan 2025 16:03:54 +0100 Subject: [PATCH] Add notifications about git packages --- update-notify | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/update-notify b/update-notify index eea7ae4..d88cde5 100755 --- a/update-notify +++ b/update-notify @@ -1,5 +1,11 @@ #!/bin/bash +check_git_monitor() +{ + command -v git-monitor > /dev/null + echo "$?" +} + if [ "$#" -eq 1 ]; then threshold=$1 else @@ -9,6 +15,7 @@ fi arch_updates=$(checkupdates | wc -l) aur_updates=$(aur repo -u -d aur-local | wc -l) kernel_update=$(checkupdates | grep linux | grep -v custom | grep -v archlinux | grep -v api | grep -v firmware | wc -l) +git_monitor=$(check_git_monitor) if [ "$kernel_update" -eq 0 ]; then kernel_update=$(vercmp `pacman -Si linux | grep Version | cut -d':' -f2` `uname -r`) @@ -24,4 +31,8 @@ fi if [ "$updates" -ge "$threshold" ]; then notify-send "Updates available" "Arch: $arch_updates, AUR: $aur_updates" + + if [ "$git_monitor" -eq 0 ]; then + notify-send "Check git packages" "Use git-monitor for git packages updates" + fi fi