Procházet zdrojové kódy

fix typo on new* scripts

Virgil Ollivier před 5 měsíci
rodič
revize
d8bfdf495f
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      bin/newSSHKey

+ 3 - 3
bin/newSSHKey

@@ -16,10 +16,10 @@ PUBKEY="$( cat "${KEY_DIR}/${KEY_NAME}.pub" )"
 
 # check if KEY_NAME exists into OVH User Account /me
 # remote_keyname = "string or empty"
-remote_keyname=$( ./ovhcli get "me/sshKey" | jq --arg v "${KEY_NAME}" -r '.|to_entries[]|select(.value == $v ).value' )
+remote_keyname=$( ovhcli get "me/sshKey" | jq --arg v "${KEY_NAME}" -r '.|to_entries[]|select(.value == $v ).value' )
 
 # if remote_keyname exists check if pubkey is matching.
-remote_pubkey=$( ./ovhcli get "me/sshKey/${KEY_NAME}" | jq -r '.key' )
+remote_pubkey=$( ovhcli get "me/sshKey/${KEY_NAME}" | jq -r '.key' )
   
 # if remote_keyname does not match KEY_NAME = this KEY_NAME is not already uploaded into OVH Account
 if [ -z "${remote_keyname}" ] || [ "${remote_pubkey}" != "${PUBKEY}" ] ; then
@@ -27,7 +27,7 @@ if [ -z "${remote_keyname}" ] || [ "${remote_pubkey}" != "${PUBKEY}" ] ; then
   echo ">>> Uploading ${KEY_DIR}/${KEY_NAME} to OVH account"
   HTTP_PAYLOAD='{ "key": "'${PUBKEY}'", "keyName": "'${KEY_NAME}'" }'
 
-  ./ovhcli post "me/sshKey" "${HTTP_PAYLOAD}" | jq -r 'select(. != null)'
+  ovhcli post "me/sshKey" "${HTTP_PAYLOAD}" | jq -r 'select(. != null)'
 
 else
   echo "SSH Keys are up-to-date"