Created
July 12, 2021 20:42
-
-
Save chrisjrn/63450a717176ff9cd708b7eca694cc24 to your computer and use it in GitHub Desktop.
Homebrew for arch-specific shells
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # HOW TO USE: | |
| # 1. Install homebrew to the default location in an ARM shell (`arch -arm64 zsh`) then in an intel shell (`arch -x86_64 zsh`) | |
| # 2. Save this file somewhere in your home directory | |
| # 3. Add the following command to your ~/.zprofile file: eval "$(zsh ~/bin/homebrew_shellenv.sh)" | |
| ARCH=`arch` | |
| if [[ "$ARCH" = "arm64" ]] | |
| then | |
| BIN_BREW="/opt/homebrew/bin/brew" | |
| else | |
| BIN_BREW="/usr/local/Homebrew/bin/brew" | |
| fi | |
| $BIN_BREW shellenv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment