summaryrefslogtreecommitdiffstats
path: root/update_checker.sh
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2009-09-20 00:26:16 +0200
committerFlorian Pritz <bluewind@xssn.at>2009-09-20 00:26:16 +0200
commitb6310b067ed26ab874ed38c880ac2647a96aa7a3 (patch)
treeb4382e626b40615983086b4a77d1948a93cb817a /update_checker.sh
parentb2fe80e07ca4363c0707d161f664d75e5e391422 (diff)
downloadbin-b6310b067ed26ab874ed38c880ac2647a96aa7a3.tar.gz
bin-b6310b067ed26ab874ed38c880ac2647a96aa7a3.tar.xz
update_checker.sh: fix for pacman 3.3
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'update_checker.sh')
-rwxr-xr-xupdate_checker.sh6
1 files changed, 3 insertions, 3 deletions
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"