diff options
-rw-r--r-- | bash/env.profile | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/bash/env.profile b/bash/env.profile index 52c1a21..ed9dbac 100644 --- a/bash/env.profile +++ b/bash/env.profile @@ -1,3 +1,17 @@ -# vi:syntax=sh +# vi:filetype=sh + +function appendpath() { + local regex="[:^]${1//'/'/'\/'}[:$]" + echo $regex + if [[ ! ${PATH} =~ $regex ]]; then + PATH=$PATH:$1 + fi +} + +appendpath "$HOME/bin" +appendpath "$DOTFILEBASE/scripts" + +export PATH +unset appendpath export EDITOR=vim |