From 3a681b667061a772ad0c69f15d4ab4e52b2fda6d Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 20 Dec 2013 13:11:32 +0100 Subject: [PATCH] Exit with error if template creation response text contains a space Should really check for response code, but dunno how to do that right away --- tools/create_template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/create_template b/tools/create_template index d79577fe..36661836 100755 --- a/tools/create_template +++ b/tools/create_template @@ -41,5 +41,9 @@ if test x${verbose} = xyes; then echo "${res}" fi +# Successful response contains no space +echo "$res" | grep " " && { echo $res && exit 1; } + tok=`echo "$res" | sed 's/.*"template_id":"\([^"]*\)".*/\1/'` echo $tok +