Skip to content

Instantly share code, notes, and snippets.

@chrisjrn
Created May 10, 2021 20:52
Show Gist options
  • Select an option

  • Save chrisjrn/517e2a462ac64e393fb73f7954f1ae5e to your computer and use it in GitHub Desktop.

Select an option

Save chrisjrn/517e2a462ac64e393fb73f7954f1ae5e to your computer and use it in GitHub Desktop.
Run the correct homebrew shellenv based on arch
#!/bin/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