mirror of
https://github.com/KittyKatt/screenFetch.git
synced 2026-01-09 14:28:04 -05:00
Fix Homebrew package count on macOS. Newer versions of Homebrew use /opt instead of /usr/local by default
This commit is contained in:
@@ -1439,7 +1439,11 @@ detectpkgs () {
|
||||
pkgs=$((pkgs + (port_pkgs - offset)))
|
||||
fi
|
||||
if type -p brew >/dev/null 2>&1; then
|
||||
brew_pkgs=$(ls -1 /usr/local/Cellar/ | wc -l)
|
||||
if [ -d "/opt/homebrew/Cellar" ]; then
|
||||
brew_pkgs=$(ls -1 /opt/homebrew/Cellar/ | wc -l)
|
||||
else
|
||||
brew_pkgs=$(ls -1 /usr/local/Cellar/ | wc -l)
|
||||
fi
|
||||
pkgs=$((pkgs + brew_pkgs))
|
||||
fi
|
||||
if type -p pkgin >/dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user