From 5ca8f8cc814151c8031cdc8df8cd0d0d19c36598 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Wed, 30 Mar 2016 18:50:24 +1100 Subject: [PATCH 1/2] made OS X packages SUPER fast --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 94afddc8..170da42e 100755 --- a/neofetch +++ b/neofetch @@ -695,8 +695,8 @@ getpackages () { fi if type -p brew >/dev/null 2>&1; then - brew_packages=$(brew list -1 2>/dev/null | wc -l) - packages=$((packages + brew_packages)) + brew_packages=$(find /usr/local/Cellar -maxdepth 1 2>/dev/null | wc -l) + packages=$((packages + $((brew_packages - 1)))) fi if type -p pkgin >/dev/null 2>&1; then From f341c8163dec902fc40586ce6a0cf5bfcdd8ccc2 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Wed, 30 Mar 2016 19:11:46 +1100 Subject: [PATCH 2/2] made maths part smaller --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 170da42e..429df28e 100755 --- a/neofetch +++ b/neofetch @@ -691,12 +691,12 @@ getpackages () { if type -p port >/dev/null 2>&1; then port_packages=$(port installed 2>/dev/null | wc -l) - packages=$((packages + $((port_packages - 1)))) + packages=$((packages + port_packages - 1)) fi if type -p brew >/dev/null 2>&1; then brew_packages=$(find /usr/local/Cellar -maxdepth 1 2>/dev/null | wc -l) - packages=$((packages + $((brew_packages - 1)))) + packages=$((packages + brew_packages - 1)) fi if type -p pkgin >/dev/null 2>&1; then