aboutsummaryrefslogtreecommitdiff
path: root/.path
blob: 844df14bcba64b9535ec8f0d28ac7931f09e4b82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

[ -d $HOME/bin ] && export PATH=$HOME/bin:$PATH
[ -d $HOME/.local/bin ] && export PATH=$HOME/.local/bin:$PATH

if command -v go > /dev/null
then
    export GOPATH=$(go env GOPATH)
    export PATH=$PATH:$(go env GOPATH)/bin
fi

# gem env is quite slow in macos.
# Don't set the environment variables as mitigation.
if [ ! $(uname) = Darwin ] &&
    gem env user_gemhome &> /dev/null; then
    export GEM_HOME="$(gem env user_gemhome)"
    export PATH="$PATH:$GEM_HOME/bin"
fi

if command -v cargo > /dev/null; then
    export PATH="$PATH:$HOME/.cargo/bin"
fi