aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-02-26 17:42:43 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-02-26 17:42:43 +0100
commit08f28902a97a359cfd2c3df74443ae0e28fd59cd (patch)
tree93270899ff3ade5178116f4c48e8c4e7a5b324c4
parent178ffef0226b45ad4b1862c7e9223cd539788bcc (diff)
downloaddotfiles-08f28902a97a359cfd2c3df74443ae0e28fd59cd.tar.gz
updated env
-rw-r--r--bash/env.profile16
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