Allow multiple Address fields

This commit is contained in:
Alexandre
2026-02-08 17:33:56 +01:00
committed by GitHub
parent eee640ab99
commit a665b1b02f

View File

@@ -26,7 +26,15 @@ _parse_config() {
if [[ "$line" =~ ^[[:space:]]*([^=[:space:]]+)[=[:space:]]+(.*)[[:space:]]* ]]; then
local key="${BASH_REMATCH[1]}"
local value="${BASH_REMATCH[2]}"
config_ref["$key"]="$value"
if [[ "$key" == "Address" ]]; then
if [[ -n "${config_ref["Address"]:-}" ]]; then
config_ref["Address"]+=",${value}"
else
config_ref["Address"]="${value}"
fi
else
config_ref["$key"]="$value"
fi
fi
done < "$config_file"
}