-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.path
30 lines (25 loc) · 1.04 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
#!/bin/bash
# .path
########################################################################
# If on OSX and GNU coreutils is installed, use them over the BSD variants
if [[ ( -d /usr/local/opt/coreutils/libexec/gnubin ) && ( ! "$PATH" =~ (^|:)"/usr/local/opt/coreutils/libexec/gnubin"(:|$) ) ]] ; then
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
fi
if [[ ( -d /usr/local/opt/coreutils/libexec/gnuman ) && ( ! "$MANPATH" =~ (^|:)"/usr/local/opt/coreutils/libexec/gnuman"(:|$) ) ]] ; then
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
fi
# Add /usr/local paths
if [[ ! "$PATH" =~ (^|:)"/usr/local/sbin"(:|$) ]] ; then
export PATH="/usr/local/sbin:$PATH"
fi
if [[ ! "$PATH" =~ (^|:)"/usr/local/bin"(:|$) ]] ; then
export PATH="/usr/local/bin:$PATH"
fi
# shellcheck disable=SC1091
if [[ -d /usr/local/share/chruby ]]; then
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
fi
if [[ ! "$PATH" =~ (^|:)"${HOME}/local/bin"(:|$) ]] ; then
export PATH=${HOME}/local/bin:$PATH
fi