From cda8ae2ab661172d6aa5b086864aa6cdbe460414 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Tue, 8 Dec 2020 11:53:37 +0100 Subject: [PATCH] feat(bash): source local config from ~/.local/etc/bash/profile --- roles/bash/files/profile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/bash/files/profile b/roles/bash/files/profile index eab4601..06fb5e7 100644 --- a/roles/bash/files/profile +++ b/roles/bash/files/profile @@ -20,6 +20,7 @@ export LC_CTYPE="en_US.UTF-8" export LESS="-i -j.49 -M -R -z-2" export LESSHISTFILE="$XDG_CACHE_HOME/less/history" export LESSHISTSIZE=1000 +export LOCAL_CONFIG="$HOME/.local/etc" export LOCAL_PREFIX="/usr/local" if command -v brew &>/dev/null; then LOCAL_PREFIX="$(brew --prefix)" @@ -440,9 +441,9 @@ while read -r d; do [ -d "$d" ] && for f in "$d"/*; do [ -f "$f" ] && . "$f"; do EOL unset d f -# Source a local bashrc if available -if [ -f "$XDG_CONFIG_HOME/bash/profile.local" ]; then +# Source a local bash configuration if available +if [ -f "$LOCAL_CONFIG/bash/profile" ]; then # shellcheck disable=SC1090 - source "$XDG_CONFIG_HOME/bash/profile.local" + source "$LOCAL_CONFIG/bash/profile" fi