Skip to content

Commit

Permalink
Added support for brew macos arm installations in init-sloth.sh (#93)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel Trabanco Llano <gtrabanco@users.noreply.github.com>
  • Loading branch information
gtrabanco and gtrabanco authored Jul 18, 2021
1 parent c2ddbbc commit 4949529
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shell/init-sloth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ elif [[ -n "${ZSH_VERSION:-}" ]]; then
fi
export SLOTH_UNAME SLOTH_OS SLOTH_ARCH SLOTH_SHELL

# LOAD BREW PATHS
# BREW_BIN is necessary because maybe is not set the path where it is brew installed
BREW_BIN=""
# Locating brew binary
if [[ -d "/home/linuxbrew/.linuxbrew" && -x "/home/linuxbrew/.linuxbrew/bin/brew" ]]; then
BREW_BIN="/home/linuxbrew/.linuxbrew/bin/brew"
elif [[ -d "${HOME}/.linuxbrew" && -x "${HOME}/.linuxbrew/bin/brew" ]]; then
BREW_BIN="${HOME}/.linuxbrew/bin/brew"
elif [[ -x "/opt/homebrew/bin/brew" ]]; then
BREW_BIN="/opt/homebrew/bin/brew"
elif [[ -x "/usr/local/bin/brew" ]]; then
BREW_BIN="/usr/local/bin/brew"
elif command -v brew &> /dev/null; then
Expand Down

0 comments on commit 4949529

Please sign in to comment.