Add notifications about git packages
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
check_git_monitor()
|
||||||
|
{
|
||||||
|
command -v git-monitor > /dev/null
|
||||||
|
echo "$?"
|
||||||
|
}
|
||||||
|
|
||||||
if [ "$#" -eq 1 ]; then
|
if [ "$#" -eq 1 ]; then
|
||||||
threshold=$1
|
threshold=$1
|
||||||
else
|
else
|
||||||
@@ -9,6 +15,7 @@ fi
|
|||||||
arch_updates=$(checkupdates | wc -l)
|
arch_updates=$(checkupdates | wc -l)
|
||||||
aur_updates=$(aur repo -u -d aur-local | 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)
|
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
|
if [ "$kernel_update" -eq 0 ]; then
|
||||||
kernel_update=$(vercmp `pacman -Si linux | grep Version | cut -d':' -f2` `uname -r`)
|
kernel_update=$(vercmp `pacman -Si linux | grep Version | cut -d':' -f2` `uname -r`)
|
||||||
@@ -24,4 +31,8 @@ fi
|
|||||||
|
|
||||||
if [ "$updates" -ge "$threshold" ]; then
|
if [ "$updates" -ge "$threshold" ]; then
|
||||||
notify-send "Updates available" "Arch: $arch_updates, AUR: $aur_updates"
|
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
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user