From 08f28902a97a359cfd2c3df74443ae0e28fd59cd Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Wed, 26 Feb 2020 17:42:43 +0100 Subject: updated env --- bash/env.profile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3