aboutsummaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-03-12 12:54:20 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-03-12 12:54:20 +0100
commitf52f92065071992b68a047b1a016a6b74ae8b89f (patch)
treeb0fe91820a1109ff30d969bb2056c3552085a214 /bashrc
parent6a092dabee70828477f2536f0828c68550f1b782 (diff)
downloaddotfiles-f52f92065071992b68a047b1a016a6b74ae8b89f.tar.gz
dotfiles-f52f92065071992b68a047b1a016a6b74ae8b89f.zip
[bash] only export DOTFILES_LOCATION if not already set
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc7
1 files 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