Only make curl verbose when -v is passed to commandline

This commit is contained in:
Sandro Santilli 2013-07-04 11:15:21 +02:00
parent 8c51c97102
commit 563764dc4f

View File

@ -26,7 +26,10 @@ path="tiles/layergroup"
#port=8083
#path="database/cartodb_dev_user_1_db/layergroup"
cmd="curl -vskH Content-Type:application/json --data-binary @${cfg} ${proto}://${user}.${domain}:${port}/${path}"
cmd="curl -skH Content-Type:application/json --data-binary @${cfg} ${proto}://${user}.${domain}:${port}/${path}"
if test x${verbose} = xyes; then
cmd="${cmd} -v"
fi
res=`${cmd}`
if test $? -gt 0; then
echo "curl command failed: ${cmd}"