Browse Source

Fix Syntax

Yann Bizeul 6 years ago
parent
commit
f1b0dd7836
1 changed files with 7 additions and 7 deletions
  1. 7 7
      deploy/gitlab.sh

+ 7 - 7
deploy/gitlab.sh

@@ -1,4 +1,4 @@
-#!/usr/bin/env sh -x
+#!/usr/bin/env sh
 
 
 # Script to deploy certificate to a Gitlab hosted page
 # Script to deploy certificate to a Gitlab hosted page
 
 
@@ -56,19 +56,19 @@ gitlab_deploy() {
 
 
   #curl -s --fail --request PUT --header "PRIVATE-TOKEN: $Le_Deploy_gitlab_token" --form "certificate=@$_cfullchain" --form "key=@$_ckey" "https://gitlab.com/api/v4/projects/$Le_Deploy_gitlab_project_id/pages/domains/$Le_Deploy_gitlab_domain" >/dev/null && exit 0
   #curl -s --fail --request PUT --header "PRIVATE-TOKEN: $Le_Deploy_gitlab_token" --form "certificate=@$_cfullchain" --form "key=@$_ckey" "https://gitlab.com/api/v4/projects/$Le_Deploy_gitlab_project_id/pages/domains/$Le_Deploy_gitlab_domain" >/dev/null && exit 0
   
   
-  string_fullchain=$( _url_encode < $_cfullchain )
-  string_key=$( _url_encode <  $_ckey )
+  string_fullchain=$(_url_encode < $_cfullchain)
+  string_key=$(_url_encode <  $_ckey)
   
   
   body="certificate=$string_fullchain&key=$string_key"
   body="certificate=$string_fullchain&key=$string_key"
-  
+
   export _H1="PRIVATE-TOKEN: $Le_Deploy_gitlab_token"
   export _H1="PRIVATE-TOKEN: $Le_Deploy_gitlab_token"
 
 
   gitlab_url="https://gitlab.com/api/v4/projects/$Le_Deploy_gitlab_project_id/pages/domains/$Le_Deploy_gitlab_domain"
   gitlab_url="https://gitlab.com/api/v4/projects/$Le_Deploy_gitlab_project_id/pages/domains/$Le_Deploy_gitlab_domain"
-  
-  _response=$( _post "$body" "$gitlab_url" 0 PUT | _dbase64 "multiline" )
+
+  _response=$(_post "$body" "$gitlab_url" 0 PUT | _dbase64 "multiline")
 
 
   error_response="error"
   error_response="error"
-  
+
   if test "${_response#*$error_response}" != "$_response"; then
   if test "${_response#*$error_response}" != "$_response"; then
     _err "Error in deploying certificate:"
     _err "Error in deploying certificate:"
     _err "$_response"
     _err "$_response"