From e29ea8c0ee64ccbd39ae6085f1bed31a2c7351af Mon Sep 17 00:00:00 2001 From: shockrah Date: Wed, 10 Feb 2021 20:41:38 -0800 Subject: [PATCH] better logging for neocities deployment --- upload.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/upload.sh b/upload.sh index b71318a..f06b2cd 100755 --- a/upload.sh +++ b/upload.sh @@ -14,8 +14,8 @@ _upload_html() { fi for f in $@;do remote_path=${f:1} - echo curl -H "auth" -F "$remote_path=@$f" $url/api/upload - curl -H "$auth" -F "$remote_path=@$f" $url/api/upload > /dev/null + echo curl -s -o /dev/null -w '%{http_code}' -H "auth" -F "$remote_path=@$f" $url/api/upload + curl -s -o /dev/null -w '%{http_code}' -H "auth" -F "$remote_path=@$f" $url/api/upload done } @@ -26,8 +26,8 @@ _upload_media() { for f in $@;do remote_path=${f:1} - echo curl -H "auth" -F "$remote_path=@$f" $url/api/upload - curl -H "$auth" -F "$remote_path=@$f" $url/api/upload + echo curl -s -o /dev/null -w '%{http_code}' -H "auth" -F "$remote_path=@$f" $url/api/upload + curl -s -o /dev/null -w '%{http_code}' -H "auth" -F "$remote_path=@$f" $url/api/upload done }