Support for $XDG_CONFIG_HOME

This commit is contained in:
2020-05-30 17:10:25 +02:00
parent 22ada23b8b
commit e9bd0acd5f
9 changed files with 62 additions and 20 deletions
+4 -1
View File
@@ -20,7 +20,10 @@ origin="$2"
# Load configuration
CONFIG_DEFAULT_BRANCH="master"
if [[ -f "$HOME/.project.cnf" ]]; then
configPath=${XDG_CONFIG_HOME:-$HOME/.config}
if [[ -f "$configPath/projectr/config.sh" ]]; then
source "$configPath/projectr/config.sh"
elif [[ -f "$HOME/.project.cnf" ]]; then
source "$HOME/.project.cnf"
fi