diff options
Diffstat (limited to 'request-trove-account')
-rwxr-xr-x | request-trove-account | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/request-trove-account b/request-trove-account index e4efd96..d62baf6 100755 --- a/request-trove-account +++ b/request-trove-account @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # request-trove-account - E-mails codethink with your public key requesting # an account on the Trove. @@ -21,4 +21,10 @@ else sshkey=$(cat ~/.ssh/id_rsa.pub) fi -curl "http://trove-accounts.genivi.baserock.com/?name=$name&email=$email&phone=$phone&pubkey=$sshkey" +# remove leading/trailing white space (esp. newlines) from user data +name=$(echo -n $name) +email=$(echo -n $email) +phone=$(echo -n $phone) +sshkey=$(echo -n $sshkey) + +curl "http://trove-accounts.genivi.baserock.com/?name=$name&email=$email&phone=$phone&pubkey=$sshkey" >/dev/null |