Move setting path variable to it's own file

main
Buddy Sandidge 6 years ago
parent 932399e2ad
commit 1074406b66

@ -31,33 +31,6 @@ if [ "$TERM" == "xterm" ]; then
export TERM=xterm-256color
fi
function _add-path {
dir="$1"
if [[ $PATH =~ "$dir" ]]; then
return
fi
if [[ -d $dir ]]; then
PATH=$dir:$PATH
fi
}
_add-path ~/.cargo/bin
_add-path ~/go/bin
_add-path /var/lib/gems/1.8/bin
_add-path /Library/Frameworks/Python.framework/Versions/2.7/bin
_add-path ~/Library/Python/2.7/bin
_add-path ~/.rvm/bin
_add-path ~/opt/bin
_add-path /usr/local/mysql/bin
_add-path /opt/vertica/bin
_add-path /opt/local/bin
_add-path /opt/local/sbin
_add-path ~/bin
_add-path /usr/local/go/bin
_add-path ~/.bin
_add-path ~/opt/depot_tools
_add-path ~/.yarn/bin
if [[ $(uname) == 'Darwin' ]]; then
export BS_OS='osx'
elif [[ $(uname) == 'Linux' ]]; then

@ -0,0 +1,28 @@
#!/usr/bin/env bash
function _add-path {
dir="$1"
if [[ $PATH =~ "$dir" ]]; then
return
fi
if [[ -d $dir ]]; then
PATH=$dir:$PATH
fi
}
_add-path ~/.cargo/bin
_add-path ~/go/bin
_add-path /var/lib/gems/1.8/bin
_add-path /Library/Frameworks/Python.framework/Versions/2.7/bin
_add-path ~/Library/Python/2.7/bin
_add-path ~/.rvm/bin
_add-path ~/opt/bin
_add-path /usr/local/mysql/bin
_add-path /opt/vertica/bin
_add-path /opt/local/bin
_add-path /opt/local/sbin
_add-path ~/bin
_add-path /usr/local/go/bin
_add-path ~/.bin
_add-path ~/opt/depot_tools
_add-path ~/.yarn/bin

@ -5,6 +5,10 @@ if [ -f ~/.bash/environment ]; then
source ~/.bash/environment
fi
if [ -f ~/.bash/path ]; then
source ~/.bash/path
fi
if [ -f ~/.bash/colors ]; then
source ~/.bash/colors
fi

Loading…
Cancel
Save