bash: add macOS environment variables

This commit is contained in:
2025-05-14 16:56:18 -05:00
parent 007db7e0ce
commit f5a9f2d184

21
.bashrc
View File

@ -59,6 +59,27 @@ else
warn "nvim not found"
fi
# OS specific environment
case "$OSTYPE" in
darwin*)
# Homebrew
if [[ -d /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
else
warn "homebrew not found"
fi
# Ruby
if [[ -d /opt/homebrew/opt/ruby ]]; then
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
else
warn "homebrew ruby not found"
fi
;;
esac
# Tools
# fzf