Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
38a8721a
Commit
38a8721a
authored
Jan 04, 2020
by
Ryan Meyers
Browse files
Escape opening brackets
parent
8aedf26a
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_linode_v4.sh
View file @
38a8721a
...
@@ -74,7 +74,7 @@ dns_linode_v4_rm() {
...
@@ -74,7 +74,7 @@ dns_linode_v4_rm() {
if
_rest GET
"/
$_domain_id
/records"
&&
[
-n
"
$response
"
]
;
then
if
_rest GET
"/
$_domain_id
/records"
&&
[
-n
"
$response
"
]
;
then
response
=
"
$(
echo
"
$response
"
|
tr
-d
"
\n
"
|
tr
'{'
"|"
|
sed
's/|/&{/g'
|
tr
"|"
"
\n
"
)
"
response
=
"
$(
echo
"
$response
"
|
tr
-d
"
\n
"
|
tr
'{'
"|"
|
sed
's/|/&{/g'
|
tr
"|"
"
\n
"
)
"
resource
=
"
$(
echo
"
$response
"
| _egrep_o
"{.*
\"
name
\"
: *
\"
$_sub_domain
\"
.*}"
)
"
resource
=
"
$(
echo
"
$response
"
| _egrep_o
"
\
{
.*
\"
name
\"
: *
\"
$_sub_domain
\"
.*}"
)
"
if
[
"
$resource
"
]
;
then
if
[
"
$resource
"
]
;
then
_resource_id
=
$(
printf
"%s
\n
"
"
$resource
"
| _egrep_o
"
\"
id
\"
: *[0-9]+"
| _head_n 1 |
cut
-d
:
-f
2 |
tr
-d
\
)
_resource_id
=
$(
printf
"%s
\n
"
"
$resource
"
| _egrep_o
"
\"
id
\"
: *[0-9]+"
| _head_n 1 |
cut
-d
:
-f
2 |
tr
-d
\
)
if
[
"
$_resource_id
"
]
;
then
if
[
"
$_resource_id
"
]
;
then
...
@@ -139,7 +139,7 @@ _get_root() {
...
@@ -139,7 +139,7 @@ _get_root() {
return
1
return
1
fi
fi
hostedzone
=
"
$(
echo
"
$response
"
| _egrep_o
"{.*
\"
domain
\"
: *
\"
$h
\"
.*}"
)
"
hostedzone
=
"
$(
echo
"
$response
"
| _egrep_o
"
\
{
.*
\"
domain
\"
: *
\"
$h
\"
.*}"
)
"
if
[
"
$hostedzone
"
]
;
then
if
[
"
$hostedzone
"
]
;
then
_domain_id
=
$(
printf
"%s
\n
"
"
$hostedzone
"
| _egrep_o
"
\"
id
\"
: *[0-9]+"
| _head_n 1 |
cut
-d
:
-f
2 |
tr
-d
\
)
_domain_id
=
$(
printf
"%s
\n
"
"
$hostedzone
"
| _egrep_o
"
\"
id
\"
: *[0-9]+"
| _head_n 1 |
cut
-d
:
-f
2 |
tr
-d
\
)
if
[
"
$_domain_id
"
]
;
then
if
[
"
$_domain_id
"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment