diff options
| -rw-r--r-- | .bash_profile | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/.bash_profile b/.bash_profile index b4709ab..7951242 100644 --- a/.bash_profile +++ b/.bash_profile @@ -46,26 +46,36 @@ export PATH="/usr/local/bin:$PATH" export PATH="/usr/local/sbin:$PATH" # ==== rbenv config. -export PATH="$HOME/.rbenv/bin:$PATH" -eval "$(rbenv init -)" +if command -v rbenv 1>/dev/null 2>&1; then + export PATH="$HOME/.rbenv/bin:$PATH" + eval "$(rbenv init -)" +fi # ==== NVM config # node version manager from homebrew ,the source line to move install location # and prevent Node installs being lost upon upgrading nvm. -export NVM_DIR=~/.nvm -source $(brew --prefix nvm)/nvm.sh +if [ -d $HOME/.nvm ]; then + export NVM_DIR=~/.nvm + source $(brew --prefix nvm)/nvm.sh +fi # ==== pyenv config (and virtualenv) -eval "$(pyenv init --path)" -eval "$(pyenv init -)" -eval "$(pyenv virtualenv-init -)" +if command -v pyenv 1>/dev/null 2>&1; then + eval "$(pyenv init --path)" + eval "$(pyenv init -)" + eval "$(pyenv virtualenv-init -)" +fi # ==== Rust config -source "$HOME/.cargo/env" +if [ -f $HOME/.cargo/env ]; then + source "$HOME/.cargo/env" +fi # ==== MISC config -# allow fuck to be alias of thefuck -eval $(thefuck --alias) +if command -v thefuck 1>/dev/null 2>&1; then + # allow fuck to be alias of thefuck + eval $(thefuck --alias) +fi # ==== MISC CowSay fortune | cowsay | lolcat |
