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
@@ -66,7 +66,10 @@ revision="${2:-latest}"
# Load configuration
CONFIG_PRESERVE_VERSIONS=5
CONFIG_HASH_LENGTH=40
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
if [[ $CONFIG_PRESERVE_VERSIONS == 1 ]]; then