Add some brew compat (possibly?)
This commit is contained in:
parent
bb63236125
commit
51bf4161b2
@ -53,6 +53,21 @@ has() {
|
||||
command -v "$1" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# Source in homebrew configuration, if we have it installed
|
||||
if has brew; then
|
||||
brewfix=/usr/local
|
||||
# This patch is needed on Apple silicon
|
||||
if [ -f /opt/homebrew/bin/brew ]; then
|
||||
brewfix="/opt/homebrew"
|
||||
fi
|
||||
eval "$("$brewfix"/bin/brew shellenv)"
|
||||
# Add coreutils to path, if we can
|
||||
if [ -d "$brewfix"/opt/coreutils/libexec/gnubin ]; then
|
||||
export PATH="$brewfix/opt/coreutils/libexec/gnubin:$PATH"
|
||||
fi
|
||||
unset brew
|
||||
fi
|
||||
|
||||
# Grab pip completion, if it exists
|
||||
if has pip; then
|
||||
case "$_baseshell" in
|
||||
|
Loading…
Reference in New Issue
Block a user