-
Notifications
You must be signed in to change notification settings - Fork 0
/
.path
57 lines (48 loc) · 1.46 KB
/
.path
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
function load_goroot() {
local _PWD=${HOME}
if ! source $_PWD/.path-goroot 2>/dev/null; then
export GOROOT="$(brew --prefix golang)/libexec"
# Create the file in the background
(echo "export GOROOT=\"$GOROOT\"" >$_PWD/.path-goroot &) >/dev/null
fi
}
function load_javahome() {
local _PWD=${HOME}
if ! source $_PWD/.path-javahome 2>/dev/null; then
export JAVA_HOME="$(/usr/libexec/java_home)"
# Create the file in the background
(echo "export JAVA_HOME=\"$JAVA_HOME\"" >$_PWD/.path-javahome &) >/dev/null
fi
}
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/opt/homebrew/bin/brew shellenv)"
# export PATH="/usr/local/sbin:${HOME}/bin:/usr/local/bin:${HOME}/.composer/vendor/bin:/usr/local/php5/bin:${HOME}/go/bin:$PATH"
# export PATH="${PATH}:/usr/local/opt/go/libexec/bin"
# export PATH="${HOME}/.rbenv/shims:${PATH}"
BEFORE=(
${HOME}/.rbenv/shims
${HOME}/.composer/vendor/bin
/usr/local/bin
/usr/local/sbin
)
AFTER=(
/usr/local/php5/bin
${HOME}/go/bin
/usr/local/opt/go/libexec/bin
)
IFS=":"
P=("${BEFORE[*]}" "${PATH}" "${AFTER[*]}")
PATH=$(
IFS=":"
echo "${P[*]}"
)
export PATH
# nvm_dir is already set in .zshrc
# export NVM_DIR="$HOME/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export NODE_PATH="$(npm root -g)"
export GOPATH="${HOME}/go"
load_goroot
load_javahome