diff --git a/bash/environment b/bash/environment index 3ab63a1..7c0f2ed 100644 --- a/bash/environment +++ b/bash/environment @@ -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 diff --git a/bash/path b/bash/path new file mode 100644 index 0000000..48099c1 --- /dev/null +++ b/bash/path @@ -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 diff --git a/bashrc b/bashrc index ab44236..7069050 100644 --- a/bashrc +++ b/bashrc @@ -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