Browse Source

Merge pull request #4086 from plett/aws-multiline-comments

Squash multiline responses. Fixes issue #4085
pull/4161/head
neil 2 years ago committed by GitHub
parent
commit
4951b58b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dnsapi/dns_aws.sh

2
dnsapi/dns_aws.sh

@ -168,7 +168,7 @@ _get_root() {
aws_rest GET "2013-04-01/hostedzone"
while true; do
if _contains "$response" "<Name>$h.</Name>"; then
hostedzone="$(echo "$response" | sed 's/<HostedZone>/#&/g' | tr '#' '\n' | _egrep_o "<HostedZone><Id>[^<]*<.Id><Name>$h.<.Name>.*<PrivateZone>false<.PrivateZone>.*<.HostedZone>")"
hostedzone="$(echo "$response" | tr -d '\n' | sed 's/<HostedZone>/#&/g' | tr '#' '\n' | _egrep_o "<HostedZone><Id>[^<]*<.Id><Name>$h.<.Name>.*<PrivateZone>false<.PrivateZone>.*<.HostedZone>")"
_debug hostedzone "$hostedzone"
if [ "$hostedzone" ]; then
_domain_id=$(printf "%s\n" "$hostedzone" | _egrep_o "<Id>.*<.Id>" | head -n 1 | _egrep_o ">.*<" | tr -d "<>")

Loading…
Cancel
Save