#!/usr/bin/env bash if [ -f /dev/shm/claws_offline ] then echo "" exit fi if [ ! -f /dev/shm/updates ] then echo 0 > /dev/shm/updates fi avail=$(checkupdates | wc -l) aur=$(yaourt -Qua | grep 'aur/' | wc -l) total=$(($avail + $aur)) if [[ $total -eq 0 ]] then echo "" else echo "" if [[ $(cat /dev/shm/updates) -ne $total ]] then [[ $total -eq 1 ]] && notify-send "Mise à jour disponible" "1 màj disponible" [[ $total -gt 1 ]] && notify-send "Mises à jour disponibles" "$total màj disponibles" fi fi echo $total > /dev/shm/updates