diff options
-rwxr-xr-x | update_checker.sh | 6 |
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" |