Skip to content

Commit fbeb5c2

Browse files
committed
added support for Apple Silicon and macOS Intel
1 parent 2ddd017 commit fbeb5c2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

brew_check.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
scriptname=$0
44

5+
hw=$(uname -m)
6+
if [ "$hw" = x86_64 ]; then
7+
brew=$(find "/usr/local/bin/" -iname brew)
8+
elif [ "$hw" = arm64 ]; then
9+
brew=$(find "/opt/homebrew/bin/" -iname brew)
10+
else
11+
exit 1
12+
fi
13+
514
brew_exist() {
615
type brew >/dev/null 2>&1 || {
716
echo >&2 "Homebrew needed to utilize this program. Installation instruction: https://brew.sh/ "

0 commit comments

Comments
 (0)