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
This commit is contained in:
Sandro Santilli 2013-12-20 13:11:32 +01:00
parent 3e4c141913
commit 3a681b6670

View File

@ -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