summaryrefslogtreecommitdiffstats
path: root/update_checker.sh
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-02-02 10:10:41 +0100
committerFlorian Pritz <f-p@gmx.at>2009-02-02 10:10:41 +0100
commit1978be4439657a04d2e23227f5c66bb7d4124c18 (patch)
tree134fffe3e232fbf3435bcdf38e015d11e85b852f /update_checker.sh
parentbfe28d7b3ca349968521dd527d984882baf256c2 (diff)
downloadbin-1978be4439657a04d2e23227f5c66bb7d4124c18.tar.gz
bin-1978be4439657a04d2e23227f5c66bb7d4124c18.tar.xz
updated
Diffstat (limited to 'update_checker.sh')
-rwxr-xr-xupdate_checker.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/update_checker.sh b/update_checker.sh
new file mode 100755
index 0000000..bee0543
--- /dev/null
+++ b/update_checker.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+cmd="pacman -Qu"
+pac_num=$($cmd | grep -o "Targets ([0-9]*)" | sed 's/Targets (//; s/)//')
+#$cmd | grep "Total Download Size: .*MB" | grep -o "[0-9].*"
+
+if [ ! $pac_num ]; then
+ pac_num=0
+fi
+
+if [ $pac_num -gt 0 ]; then
+ echo "${HOSTNAME}: $pac_num"
+else
+ echo "${HOSTNAME}: ok"
+fi