Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
d289b0b4
Commit
d289b0b4
authored
Mar 22, 2019
by
temoffey
Browse files
fix syntax
parent
b8489464
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/gcore_cdn.sh
View file @
d289b0b4
...
@@ -27,8 +27,8 @@ gcore_cdn_deploy() {
...
@@ -27,8 +27,8 @@ gcore_cdn_deploy() {
_debug _cca
"
$_cca
"
_debug _cca
"
$_cca
"
_debug _cfullchain
"
$_cfullchain
"
_debug _cfullchain
"
$_cfullchain
"
_fullchain
=
$(
while
read
line
;
do
printf
"%s"
"
$line
\n
"
;
done
<
"
$_cfullchain
"
)
_fullchain
=
$(
while
read
-r
line
;
do
printf
"%s"
"
$line
\n
"
;
done
<
"
$_cfullchain
"
)
_key
=
$(
while
read
line
;
do
printf
"%s"
"
$line
\n
"
;
done
<
"
$_ckey
"
)
_key
=
$(
while
read
-r
line
;
do
printf
"%s"
"
$line
\n
"
;
done
<
"
$_ckey
"
)
_debug _fullchain
"
$_fullchain
"
_debug _fullchain
"
$_fullchain
"
_debug _key
"
$_key
"
_debug _key
"
$_key
"
...
@@ -66,7 +66,7 @@ gcore_cdn_deploy() {
...
@@ -66,7 +66,7 @@ gcore_cdn_deploy() {
_debug _response
"
$_response
"
_debug _response
"
$_response
"
_regex
=
"
\"
token
\"
:
\"
([^
\"
]+)
\"
"
_regex
=
"
\"
token
\"
:
\"
([^
\"
]+)
\"
"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_token
=
$(
if
[[
$_response
=
~
$_regex
]]
;
then
printf
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_token
=
$(
if
[[
$_response
=
~
$_regex
]]
;
then
printf
"%s"
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_debug _token
"
$_token
"
_debug _token
"
$_token
"
if
[
-z
"
$_token
"
]
;
then
if
[
-z
"
$_token
"
]
;
then
...
@@ -80,19 +80,19 @@ gcore_cdn_deploy() {
...
@@ -80,19 +80,19 @@ gcore_cdn_deploy() {
_debug _response
"
$_response
"
_debug _response
"
$_response
"
_regex
=
".*(
\"
id
\"
.*?
\"
cname
\"
:
\"
$_cdomain
\"
.*?})"
_regex
=
".*(
\"
id
\"
.*?
\"
cname
\"
:
\"
$_cdomain
\"
.*?})"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_resource
=
$(
if
[[
$_response
=
~
$_regex
]]
;
then
printf
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_resource
=
$(
if
[[
$_response
=
~
$_regex
]]
;
then
printf
"%s"
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_debug _resource
"
$_resource
"
_debug _resource
"
$_resource
"
_regex
=
"
\"
id
\"
:([0-9]+)"
_regex
=
"
\"
id
\"
:([0-9]+)"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_resourceId
=
$(
if
[[
$_resource
=
~
$_regex
]]
;
then
printf
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_resourceId
=
$(
if
[[
$_resource
=
~
$_regex
]]
;
then
printf
"%s"
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_debug _resourceId
"
$_resourceId
"
_debug _resourceId
"
$_resourceId
"
_regex
=
"
\"
sslData
\"
:([0-9]+|null)"
_regex
=
"
\"
sslData
\"
:([0-9]+|null)"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_sslDataOld
=
$(
if
[[
$_resource
=
~
$_regex
]]
;
then
printf
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_sslDataOld
=
$(
if
[[
$_resource
=
~
$_regex
]]
;
then
printf
"%s"
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_debug _sslDataOld
"
$_sslDataOld
"
_debug _sslDataOld
"
$_sslDataOld
"
_regex
=
"
\"
originGroup
\"
:([0-9]+)"
_regex
=
"
\"
originGroup
\"
:([0-9]+)"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_originGroup
=
$(
if
[[
$_resource
=
~
$_regex
]]
;
then
printf
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_originGroup
=
$(
if
[[
$_resource
=
~
$_regex
]]
;
then
printf
"%s"
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_debug _originGroup
"
$_originGroup
"
_debug _originGroup
"
$_originGroup
"
if
[
-z
"
$_resourceId
"
]
||
[
-z
"
$_originGroup
"
]
;
then
if
[
-z
"
$_resourceId
"
]
||
[
-z
"
$_originGroup
"
]
;
then
...
@@ -108,7 +108,7 @@ gcore_cdn_deploy() {
...
@@ -108,7 +108,7 @@ gcore_cdn_deploy() {
_debug _response
"
$_response
"
_debug _response
"
$_response
"
_regex
=
"
\"
id
\"
:([0-9]+)"
_regex
=
"
\"
id
\"
:([0-9]+)"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_sslDataAdd
=
$(
if
[[
$_response
=
~
$_regex
]]
;
then
printf
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_sslDataAdd
=
$(
if
[[
$_response
=
~
$_regex
]]
;
then
printf
"%s"
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_debug _sslDataAdd
"
$_sslDataAdd
"
_debug _sslDataAdd
"
$_sslDataAdd
"
if
[
-z
"
$_sslDataAdd
"
]
;
then
if
[
-z
"
$_sslDataAdd
"
]
;
then
...
@@ -123,7 +123,7 @@ gcore_cdn_deploy() {
...
@@ -123,7 +123,7 @@ gcore_cdn_deploy() {
_debug _response
"
$_response
"
_debug _response
"
$_response
"
_regex
=
"
\"
sslData
\"
:([0-9]+)"
_regex
=
"
\"
sslData
\"
:([0-9]+)"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_sslDataNew
=
$(
if
[[
$_response
=
~
$_regex
]]
;
then
printf
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_sslDataNew
=
$(
if
[[
$_response
=
~
$_regex
]]
;
then
printf
"%s"
"
${
BASH_REMATCH
[1]
}
"
;
fi
)
_debug _sslDataNew
"
$_sslDataNew
"
_debug _sslDataNew
"
$_sslDataNew
"
if
[
"
$_sslDataNew
"
!=
"
$_sslDataAdd
"
]
;
then
if
[
"
$_sslDataNew
"
!=
"
$_sslDataAdd
"
]
;
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