Commit 73d04b97 authored by KUDO Takashi's avatar KUDO Takashi
Browse files

avoid "SC2046: Quote this to prevent word splitting." Travis CI error.

parent a35d2716
...@@ -32,9 +32,9 @@ dns_conoha_add() { ...@@ -32,9 +32,9 @@ dns_conoha_add() {
_saveaccountconf_mutable CONOHA_TenantId "$CONOHA_TenantId" _saveaccountconf_mutable CONOHA_TenantId "$CONOHA_TenantId"
_saveaccountconf_mutable CONOHA_IdentityServiceApi "$CONOHA_IdentityServiceApi" _saveaccountconf_mutable CONOHA_IdentityServiceApi "$CONOHA_IdentityServiceApi"
if set -- $(_conoha_get_accesstoken "$CONOHA_IdentityServiceApi/tokens" "$CONOHA_Username" "$CONOHA_Password" "$CONOHA_TenantId"); then if token="$(_conoha_get_accesstoken "$CONOHA_IdentityServiceApi/tokens" "$CONOHA_Username" "$CONOHA_Password" "$CONOHA_TenantId")"; then
accesstoken=$1 accesstoken="$(printf "%s" "$token" | sed -n 1p)"
CONOHA_Api=$2 CONOHA_Api="$(printf "%s" "$token" | sed -n 2p)"
else else
return 1 return 1
fi fi
...@@ -93,9 +93,9 @@ dns_conoha_rm() { ...@@ -93,9 +93,9 @@ dns_conoha_rm() {
_saveaccountconf_mutable CONOHA_TenantId "$CONOHA_TenantId" _saveaccountconf_mutable CONOHA_TenantId "$CONOHA_TenantId"
_saveaccountconf_mutable CONOHA_IdentityServiceApi "$CONOHA_IdentityServiceApi" _saveaccountconf_mutable CONOHA_IdentityServiceApi "$CONOHA_IdentityServiceApi"
if set -- $(_conoha_get_accesstoken "$CONOHA_IdentityServiceApi/tokens" "$CONOHA_Username" "$CONOHA_Password" "$CONOHA_TenantId"); then if token="$(_conoha_get_accesstoken "$CONOHA_IdentityServiceApi/tokens" "$CONOHA_Username" "$CONOHA_Password" "$CONOHA_TenantId")"; then
accesstoken=$1 accesstoken="$(printf "%s" "$token" | sed -n 1p)"
CONOHA_Api=$2 CONOHA_Api="$(printf "%s" "$token" | sed -n 2p)"
else else
return 1 return 1
fi fi
...@@ -181,7 +181,7 @@ _conoha_get_accesstoken() { ...@@ -181,7 +181,7 @@ _conoha_get_accesstoken() {
if expr "$utc_date" "<" "$expires" >/dev/null; then if expr "$utc_date" "<" "$expires" >/dev/null; then
# access token is still valid - reuse it # access token is still valid - reuse it
_debug "reusing access token" _debug "reusing access token"
printf "%s\n%s" "$accesstoken" "$CONOHA_Api" printf "%s\n%s\n" "$accesstoken" "$CONOHA_Api"
return 0 return 0
else else
_debug "access token expired" _debug "access token expired"
...@@ -210,7 +210,7 @@ _conoha_get_accesstoken() { ...@@ -210,7 +210,7 @@ _conoha_get_accesstoken() {
fi fi
_saveaccountconf_mutable conoha_dns_ep "$CONOHA_Api" _saveaccountconf_mutable conoha_dns_ep "$CONOHA_Api"
printf "%s\n%s" "$accesstoken" "$CONOHA_Api" printf "%s\n%s\n" "$accesstoken" "$CONOHA_Api"
return 0 return 0
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment