dotfiles/recipes/_path

19 lines
416 B
Text
Raw Permalink Normal View History

2018-02-22 14:56:10 +00:00
#!/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 $@
}