From 0737875fbdb96b88d51603a7154aae40033ff5a2 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Fri, 20 Jan 2017 01:59:00 -0500 Subject: [PATCH] Tweak http_upload.sh --- http_upload.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/http_upload.sh b/http_upload.sh index 69e9d4b..a61af99 100755 --- a/http_upload.sh +++ b/http_upload.sh @@ -10,7 +10,7 @@ set -e [ -z "$http_upload_file_size_limit" ] && http_upload_file_size_limit=$((100 * 1024 * 1024)) # bytes, default to 100 * 1024 * 1024 = 100 MB encrypt=0 -[ -z "$http_upload_encrypt" ] && encrypt=$http_upload_encrypt +[ $http_upload_encrypt -eq 1 2>/dev/null ] && encrypt=1 || true [ "$1" == '-e' ] && encrypt=1 && shift [ "$2" == '-e' ] && encrypt=1 @@ -40,6 +40,6 @@ get_url="${http_upload_url}${uuid}/${base_name}" curl -f -T "$file_to_upload" "${get_url}?v=${hmac_secret}" -echo -n "${get_url}${tag}" +echo "${get_url}${tag}" -[ $encrypt -eq 1 ] && rm "$file_to_upload" +[ $encrypt -eq 1 ] && rm "$file_to_upload" || true