From 0130c3929c7c97089ab118de108500b030e00874 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 26 Apr 2016 16:47:01 +1000 Subject: [PATCH] Swap to faster math syntax --- neofetch | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/neofetch b/neofetch index f9616dee..056b997d 100755 --- a/neofetch +++ b/neofetch @@ -650,40 +650,40 @@ getpackages () { packages="$(pacman -Qq --color never | wc -l)" type -p dpkg >/dev/null 2>&1 && \ - let packages+="$(dpkg --get-selections | grep -cv deinstall$)" + packages=$((packages+=$(dpkg --get-selections | grep -cv deinstall$))) type -p /sbin/pkgtool >/dev/null 2>&1 && \ - let packages+="$(ls -1 /var/log/packages | wc -l)" + packages=$((packages+=$(ls -1 /var/log/packages | wc -l))) type -p rpm >/dev/null 2>&1 && \ - let packages+="$(rpm -qa | wc -l)" + packages=$((packages+=$(rpm -qa | wc -l))) type -p xbps-query >/dev/null 2>&1 && \ - let packages+="$(xbps-query -l | wc -l)" + packages=$((packages+=$(xbps-query -l | wc -l))) type -p pkginfo >/dev/null 2>&1 && \ - let packages+="$(pkginfo -i | wc -l)" + packages=$((packages+=$(pkginfo -i | wc -l))) type -p pisi >/dev/null 2>&1 && \ - let packages+="$(pisi list-installed | wc -l)" + packages=$((packages+=$(pisi list-installed | wc -l))) type -p pkg >/dev/null 2>&1 && \ - let packages+="$(ls -1 /var/db/pkg | wc -l)" + packages=$((packages+=$(ls -1 /var/db/pkg | wc -l))) type -p emerge >/dev/null 2>&1 && \ - let packages+="$(ls -d /var/db/pkg/*/* | wc -l)" + packages=$((packages+=$(ls -d /var/db/pkg/*/* | wc -l))) type -p nix-env >/dev/null 2>&1 && \ - let packages+="$(ls -d -1 /nix/store/*/ | wc -l)" + packages=$((packages+=$(ls -d -1 /nix/store/*/ | wc -l))) type -p apk >/dev/null 2>&1 && \ - let packages+="$(apk info | wc -l)" + packages=$((packages+=$(apk info | wc -l))) type -p pacman-g2 >/dev/null 2>&1 && \ - let packages+="$(pacman-g2 -Q | wc -l)" + packages=$((packages+=$(pacman-g2 -Q | wc -l))) type -p cave >/dev/null 2>&1 && \ - let packages+=$(ls -d -1 /var/db/paludis/repositories/cross-installed/*/data/* /var/db/paludis/repositories/installed/data/* | wc -l) + packages=$((packages+=$(ls -d -1 /var/db/paludis/repositories/cross-installed/*/data/* /var/db/paludis/repositories/installed/data/* | wc -l))) ;; "Mac OS X")