From 8c51c97102c4f2279ed82e55640df6dc989c6d02 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 4 Jul 2013 11:04:12 +0200 Subject: [PATCH] Be more verbose about curl errors --- tools/multilayer_token | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/multilayer_token b/tools/multilayer_token index 8faa999a..e9d88c53 100755 --- a/tools/multilayer_token +++ b/tools/multilayer_token @@ -26,7 +26,11 @@ path="tiles/layergroup" #port=8083 #path="database/cartodb_dev_user_1_db/layergroup" -res=`curl -skH Content-Type:application/json --data-binary "@${cfg}" ${proto}://${user}.${domain}:${port}/${path}` +cmd="curl -vskH Content-Type:application/json --data-binary @${cfg} ${proto}://${user}.${domain}:${port}/${path}" +res=`${cmd}` +if test $? -gt 0; then + echo "curl command failed: ${cmd}" +fi if test x${verbose} = xyes; then echo "${res}"