diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-02-26 17:42:43 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-02-26 17:42:43 +0100 |
commit | 08f28902a97a359cfd2c3df74443ae0e28fd59cd (patch) | |
tree | 93270899ff3ade5178116f4c48e8c4e7a5b324c4 /bash | |
parent | 178ffef0226b45ad4b1862c7e9223cd539788bcc (diff) | |
download | dotfiles-08f28902a97a359cfd2c3df74443ae0e28fd59cd.tar.gz |
updated env
Diffstat (limited to 'bash')
-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 |