dotfiles/recipes/path
2018-02-22 09:56:10 -05:00

18 lines
416 B
Bash

#!/bin/bash
set +e
function _path_low {
PATH="$1:$PATH"
test -r ~/.bash_profile && echo "export PATH='$1'":'"$PATH"' >>~/.bash_profile
echo "export PATH='$1'":'"$PATH"' >>~/.profile
}
function _path_high {
PATH="$PATH:$1"
test -r ~/.bash_profile && echo 'export PATH="$PATH"':"'$PATH'" >>~/.bash_profile
echo "export PATH='$1'":'"$PATH"' >>~/.profile
}
function _path {
_path_low $@
}