From f52f92065071992b68a047b1a016a6b74ae8b89f Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 12 Mar 2020 12:54:20 +0100 Subject: [bash] only export DOTFILES_LOCATION if not already set --- bashrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 25dbf00..37b5519 100644 --- a/bashrc +++ b/bashrc @@ -9,8 +9,11 @@ pathadd() { pathadd ${HOME}/.local/bin -DOTFILES_LOCATION=$(dirname $(readlink -f $HOME/.bashrc)) -export DOTFILES_LOCATION +if [[ -z "$DOTFILES_LOCATION" ]] +then + DOTFILES_LOCATION=$(dirname $(readlink -f $HOME/.bashrc)) + export DOTFILES_LOCATION +fi pathadd ${DOTFILES_LOCATION}/bin -- cgit v1.2.3