Check if $XDG_CONFIG_HOME is set.

Check to see if the end user has chosen to comply with the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables)
This commit is contained in:
Ian G Canino 2021-03-08 20:59:20 -05:00 committed by GitHub
parent b0619ab93f
commit 1b843aaa55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
maza
View File

@ -7,7 +7,7 @@ set -e
NAME_OSX="Darwin" NAME_OSX="Darwin"
THIS_OS=$(uname -mrs) THIS_OS=$(uname -mrs)
PROGNAME=$(basename $0) PROGNAME=$(basename $0)
CONFIG=($HOME/.maza/) [[ -z "${XDG_CONFIG_HOME}" ]] && CONFIG=$HOME/.maza/ || CONFIG=$XDG_CONFIG_HOME/maza
HOST_FILE=(/etc/hosts) HOST_FILE=(/etc/hosts)
COLOR_RED=`tput setaf 1` COLOR_RED=`tput setaf 1`
COLOR_GREEN=`tput setaf 2` COLOR_GREEN=`tput setaf 2`