From 5555c9f9b8e9dd1e02de14634d930510fea0e7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20B=C3=BCckendorf?= Date: Mon, 3 Dec 2018 13:51:53 +0100 Subject: [PATCH] .bash_profile: The environment is loaded from .environment.d now. This will make it easier to include save parts of the environment into the repo later on. --- .bash_profile | 17 +++++++++-------- .environment.d/.gitinclude | 0 2 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .environment.d/.gitinclude diff --git a/.bash_profile b/.bash_profile index fc040ff..68026e2 100644 --- a/.bash_profile +++ b/.bash_profile @@ -9,11 +9,12 @@ fi PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH -# Export environment variables found in ~/.env . This file should contain -# environment variables that are either specific to a machine or can not be -# included in the dotfiles repository for security or privacy reasons. -if [ -f ~/.env ]; then - set -a - . ~/.env - set +a -fi +# Export environment variables found in ~/.environment.d/ . Adding files in a +# directory makes it easier to supply environment variables that are either +# specific to a machine or can not be included in the dotfiles repository for +# security or privacy reasons. +set -a +for file in ~/.environment.d/*.env; do + . "$FILE" +done +set +a diff --git a/.environment.d/.gitinclude b/.environment.d/.gitinclude new file mode 100644 index 0000000..e69de29