From fc94dc1d655a9e2d94d4af19b5a4db3ae2e6e0b5 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Wed, 28 Apr 2021 14:42:48 +0300 Subject: [PATCH] fixed error handling in upload.sh --- upload.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upload.sh b/upload.sh index 65eb5ae..5f14ac3 100755 --- a/upload.sh +++ b/upload.sh @@ -67,7 +67,9 @@ else echo "Checking neocities for a file list..." FILELIST=`curl -sS "https://$N_USER:$N_PWD@neocities.org/api/list"` - if [ `echo "$FILELIST" | jq -r ".result"` != 'success' ]; then + FILERESULT=`echo "$FILELIST" | jq -r ".result"` + + if [ "$FILERESULT" != 'success' ]; then echo "Error while requesting file list." echo "$FILELIST" exit 1