diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2012-12-03 22:03:46 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2012-12-03 22:03:46 +0000 |
commit | 59fc61c03b3d31ed2315d4f44d794d07a4aefc7b (patch) | |
tree | a2debf41b38b9243e6d26f51caec6deb5ca22d5c | |
parent | 1446236406de392a1e45d2631f25cdad2c6658a4 (diff) | |
download | genivi-initial-setup-59fc61c03b3d31ed2315d4f44d794d07a4aefc7b.tar.gz |
Attempt to make the http request work properly.
-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 |