-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.path
41 lines (30 loc) · 1.12 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
#!/usr/bin/env bash
function addToPath() {
if [ -d "$1" ]; then
if [[ "$2" == "FIRST" ]]; then
export PATH="$1:$PATH"
else
export PATH="$PATH:$1"
fi
else
echo "Path '$1' is not a directory so it could not be added to PATH"
fi
}
# Apple switched the TLS/SSL engine from OpenSSL to their own Secure Transport engine in Apple distributed cURL binary which breaks client certificate usage
# https://unix.stackexchange.com/questions/192944/how-to-fix-curl-sslv3-alert-handshake-failure
addToPath "$(brew --prefix curl)/bin" FIRST
addToPath "$(brew --prefix gnu-sed)/libexec/gnubin" FIRST
addToPath "$HOME/bin"
addToPath "$(brew --prefix openvpn)/sbin"
addToPath "$HOME/.cargo/bin"
test -f /usr/local/bin/go 2> /dev/null && \
addToPath "$(go env GOPATH)/bin" && \
addToPath "$(go env GOROOT)/bin"
addToPath "${KREW_ROOT:-$HOME/.krew}/bin"
# addToPath "/opt/applications/kui/bin"
test "$VOLTA_HOME" 2> /dev/null && \
addToPath "$VOLTA_HOME/bin"
test -f /usr/local/bin/pyenv 2> /dev/null && \
addToPath "$PYENV_ROOT/bin"
test -f $HOME/.poetry/bin/poetry 2> /dev/null && \
addToPath "$HOME/.poetry/bin"