From 66d537eee120ca6999a21aa7cd5698d680818cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 29 Jan 2016 14:11:16 +0100 Subject: [PATCH 1/3] Source $XDG_CONFIG_HOME/cdm/cdmrc as fourth option --- README.md | 1 + src/cdm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 837a366..148f624 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ existing one: [RCFILE specified on command line] $HOME/.cdmrc /etc/cdmrc + $XDG_CONFIG_HOME/cdm/cdmrc To autostart cdm when you log in your account, copy the content of /usr/share/doc/cdm/profile.sh to the tail of your shell profile (~/.profile, diff --git a/src/cdm b/src/cdm index 18857a8..57507da 100755 --- a/src/cdm +++ b/src/cdm @@ -67,6 +67,8 @@ elif [[ -f "$HOME/.cdmrc" ]]; then source "$HOME/.cdmrc" elif [[ -f /etc/cdmrc ]]; then source /etc/cdmrc +elif [[ -f "$XDG_CONFIG_HOME/cdm/cdmrc" ]]; then + source "$XDG_CONFIG_HOME/cdm/cdmrc" fi # Default options. From b0067b6027c53ee98ebafeb676986c86dbdb2517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 29 Jan 2016 23:01:05 +0100 Subject: [PATCH 2/3] Make it the third option Because it doesn't make sense to source /etc/cdmrc before the one in $XDG_CONFIG_HOME --- src/cdm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cdm b/src/cdm index 57507da..bf95a6c 100755 --- a/src/cdm +++ b/src/cdm @@ -65,10 +65,10 @@ if [[ -n "$1" ]]; then fi elif [[ -f "$HOME/.cdmrc" ]]; then source "$HOME/.cdmrc" -elif [[ -f /etc/cdmrc ]]; then - source /etc/cdmrc elif [[ -f "$XDG_CONFIG_HOME/cdm/cdmrc" ]]; then source "$XDG_CONFIG_HOME/cdm/cdmrc" +elif [[ -f /etc/cdmrc ]]; then + source /etc/cdmrc fi # Default options. From 808bb32410b4e55e9299f53772c0d5c477f08663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 30 Jan 2016 00:04:31 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 148f624..9fe7c95 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ existing one: [RCFILE specified on command line] $HOME/.cdmrc - /etc/cdmrc $XDG_CONFIG_HOME/cdm/cdmrc + /etc/cdmrc To autostart cdm when you log in your account, copy the content of /usr/share/doc/cdm/profile.sh to the tail of your shell profile (~/.profile,