From 6cda7a213e7d2fd64fbaba704f813e6dba650ca2 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 1 Nov 2021 10:46:09 +0000 Subject: [PATCH] Use XDG_CONFIG_HOME variables instead of hard-coding ~/.config --- roles/home-cli/files/bashrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/home-cli/files/bashrc b/roles/home-cli/files/bashrc index 672c448..471d590 100644 --- a/roles/home-cli/files/bashrc +++ b/roles/home-cli/files/bashrc @@ -49,9 +49,9 @@ if [ -f /etc/locale.conf ] then . /etc/locale.conf fi -if [ -f "$HOME/.config/locale.conf" ] +if [ -f "${XDG_CONFIG_DIR:-$HOME/.config}/locale.conf" ] then - . "$HOME/.config/locale.conf" + . "${XDG_CONFIG_DIR:-$HOME/.config}/locale.conf" fi # Other exports. @@ -198,9 +198,9 @@ then ssh-add "$HOME/.ssh/id_ed25519" fi -if [ -r "$HOME/.bashrc.local" ] +if [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bashrc.local" ] then - . "$HOME/.bashrc.local" + . "${XDG_CONFIG_HOME:-$HOME/.config}/bashrc.local" fi usermotd () {