Commit 429c5250 authored by Lukas Schauer's avatar Lukas Schauer

Merge pull request #151 from beelbrecht/spaces_in_configpath

allow spaces in path to additional configuration file
parents 80850767 e2d8bfa4
...@@ -86,13 +86,13 @@ load_config() { ...@@ -86,13 +86,13 @@ load_config() {
_exiterr "The path ${CONFIG_D} specified for CONFIG_D does not point to a directory." >&2 _exiterr "The path ${CONFIG_D} specified for CONFIG_D does not point to a directory." >&2
fi fi
for check_config_d in ${CONFIG_D}/*.sh; do for check_config_d in "${CONFIG_D}"/*.sh; do
if [[ ! -e "${check_config_d}" ]]; then if [[ ! -e "${check_config_d}" ]]; then
echo "# !! WARNING !! Extra configuration directory ${CONFIG_D} exists, but no configuration found in it." >&2 echo "# !! WARNING !! Extra configuration directory ${CONFIG_D} exists, but no configuration found in it." >&2
break break
elif [[ -f "${check_config_d}" ]] && [[ -r "${check_config_d}" ]]; then elif [[ -f "${check_config_d}" ]] && [[ -r "${check_config_d}" ]]; then
echo "# INFO: Using additional config file ${check_config_d}" echo "# INFO: Using additional config file ${check_config_d}"
. ${check_config_d} . "${check_config_d}"
else else
_exiterr "Specified additional config ${check_config_d} is not readable or not a file at all." >&2 _exiterr "Specified additional config ${check_config_d} is not readable or not a file at all." >&2
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment