X-Git-Url: http://git.vanrenterghem.biz/Dotty.git/blobdiff_plain/1f0ec8efee18504483a1a88bfcd395f7b5846949..708aef6d49a41f614fd0a03c3711d01dca22adde:/bash/.bashrc diff --git a/bash/.bashrc b/bash/.bashrc index 12b5184..f185983 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -31,4 +31,16 @@ export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" -export PATH="$PATH:$HOME/scripts" +# Append "$1" to $PATH when not already in. +append_path () { + case ":$PATH:" in + *:"$1":*) + ;; + *) + PATH="${PATH:+$PATH:}$1" + esac +} + +# Append our default paths +append_path '/home/frederik/scripts' +