Add some brew compat (possibly?)

This commit is contained in:
Salt 2022-11-28 15:57:31 -06:00
parent bb63236125
commit 51bf4161b2

View File

@ -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