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
0bea2e2b
Unverified
Commit
0bea2e2b
authored
Feb 27, 2022
by
Martin Arndt
Committed by
GitHub
Feb 27, 2022
Browse files
Fix formatting according to Shellcheck 2/2
parent
72d02f44
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_artfiles.sh
View file @
0bea2e2b
...
@@ -101,8 +101,9 @@ _clean_records() {
...
@@ -101,8 +101,9 @@ _clean_records() {
# from '\"' & turn '\n' into real LF characters.
# from '\"' & turn '\n' into real LF characters.
# Yup, awful API to use - but that's all we got to get this working, so... ;)
# Yup, awful API to use - but that's all we got to get this working, so... ;)
_debug2
'Raw '
"
$response
"
_debug2
'Raw '
"
$response
"
response
=
"
$(
printf
--
'%s'
"
$response
"
response
=
"
$(
\
|
sed
's/^\(.*TXT":"\)\([^,}]*\)\(.*\)$/\2/;s/.$//;s/\\"/"/g;s/\\n/\n/g'
)
"
printf
--
'%s'
"
$response
"
\
|
sed
's/^\(.*TXT":"\)\([^,}]*\)\(.*\)$/\2/;s/.$//;s/\\"/"/g;s/\\n/\n/g'
)
"
_debug2
'Clean'
"
$response
"
_debug2
'Clean'
"
$response
"
}
}
...
@@ -112,8 +113,9 @@ _clean_records() {
...
@@ -112,8 +113,9 @@ _clean_records() {
_dns
()
{
_dns
()
{
action
=
"
$1
"
action
=
"
$1
"
payload
=
"
$(
printf
--
'%s'
"
$2
"
| _url_encode
)
"
payload
=
"
$(
printf
--
'%s'
"
$2
"
| _url_encode
)
"
url
=
"
$(
printf
--
'%s%s'
"
$AF_URL_DNS
"
"
$domain
"
url
=
"
$(
\
|
sed
's/{\*}/'
"
$(
printf
--
'%s'
"
$action
"
| _lower_case
)
"
'/'
)
"
printf
--
'%s%s'
"
$AF_URL_DNS
"
"
$domain
"
\
|
sed
's/{\*}/'
"
$(
printf
--
'%s'
"
$action
"
| _lower_case
)
"
'/'
)
"
if
[
"
$action
"
=
'SET'
]
;
then
if
[
"
$action
"
=
'SET'
]
;
then
_debug2
'Payload'
"
$payload
"
_debug2
'Payload'
"
$payload
"
...
...
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