From b6310b067ed26ab874ed38c880ac2647a96aa7a3 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 20 Sep 2009 00:26:16 +0200 Subject: update_checker.sh: fix for pacman 3.3 Signed-off-by: Florian Pritz --- update_checker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'update_checker.sh') diff --git a/update_checker.sh b/update_checker.sh index 5b04156..0da5ad3 100755 --- a/update_checker.sh +++ b/update_checker.sh @@ -11,14 +11,14 @@ #---------------------------------------------------- export LC_ALL=C cmd="pacman -Qu" -pac_num=$($cmd | grep -o "Targets ([0-9]*)" | sed 's/Targets (//; s/)//') +pac_num=$($cmd | wc -l) #$cmd | grep "Total Download Size: .*MB" | grep -o "[0-9].*" -if [ ! $pac_num ]; then +if [ ! "$pac_num" ]; then pac_num=0 fi -if [ $pac_num -gt 0 ]; then +if [ "$pac_num" -gt 0 ]; then echo "${HOSTNAME}: $pac_num" else echo "${HOSTNAME}: ok" -- cgit v1.2.3-24-g4f1b