cmc/dotfiles
Using GNU Stow to manage my dotfiles.
clone: git clone https://gitbay.org/cmc/dotfiles.git
main: common/zsh/.zprofile · raw
1# ==============================================================================
2# HOMEBREW INITIALIZATION (macOS & Linux)
3# ==============================================================================
4
5if [[ "$(uname)" == "Darwin" ]]; then
6 # macOS (Apple Silicon)
7 BREW_PATH="/opt/homebrew/bin/brew"
8 # Display Message of the Day (MOTD)
9 ./motd.sh
10elif [[ "$(uname)" == "Linux" ]]; then
11 # Linux (Linuxbrew)
12 BREW_PATH="/home/linuxbrew/.linuxbrew/bin/brew"
13fi
14
15# Only run shellenv if the brew binary actually exists at that path
16if [[ -f "$BREW_PATH" ]]; then
17 eval "$($BREW_PATH shellenv)"
18fi
19
20# nvm
21export NVM_DIR="$HOME/.nvm"
22[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
23[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion