screenFetch icon indicating copy to clipboard operation
screenFetch copied to clipboard

Apple Silicon Homebrew Packages location

Open unixb0y opened this issue 1 year ago • 0 comments

I'm submitting a ... (check one with "x")

[X] bug report
[ ] new distro request

Bug report

screenfetch
ls: /usr/local/Cellar/: No such file or directory
[...] (rest looks ok)

Basically, this line has to be changed. The current version probably just works for Intel Macs, so there needs to be a switch that uses a different location based on architecture.

According to Stack Overflow:

brew_pkgs=$(ls -1 /usr/local/Cellar/ | wc -l) # for Intel

brew_pkgs=$(ls -1 /opt/homebrew/Cellar/ | wc -l) # for Apple Silicon

Alternatively, something like this may work (only tested on Apple Silicon):

brew_pkgs=$(ls -1 $(brew --prefix)/Cellar | wc -l)

unixb0y avatar Jun 10 '23 13:06 unixb0y