diff --git a/.bashrc b/.bashrc index fc9c4aa..1c43ac3 100644 --- a/.bashrc +++ b/.bashrc @@ -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