let them quotes help

This commit is contained in:
surtur 2020-05-10 20:11:23 +02:00
parent 9fd585b4c0
commit cdbd65f204
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -14,10 +14,10 @@ apiUrl=$(echo $b2_authorize_account | jq -r '.apiUrl')
B2_TOKEN=$(echo $b2_authorize_account | jq -r '.authorizationToken') B2_TOKEN=$(echo $b2_authorize_account | jq -r '.authorizationToken')
B2_BUCKET_ID=$(echo $b2_authorize_account | jq -r '.bucketId') B2_BUCKET_ID=$(echo $b2_authorize_account | jq -r '.bucketId')
if [ -z $b2_authorize_account ]; then echo b2_authorize_account is empty && exit 1; fi if [ -z "$b2_authorize_account" ]; then echo b2_authorize_account is empty; exit 1; fi
if [ -z $apiUrl ]; then echo apiUrl is empty && exit 1; fi if [ -z "$apiUrl" ]; then echo apiUrl is empty; exit 1; fi
if [ -z $B2_TOKEN ]; then echo B2_TOKEN is empty && exit 1; fi if [ -z "$B2_TOKEN" ]; then echo B2_TOKEN is empty; exit 1; fi
if [ -z $B2_BUCKET_ID ]; then echo B2_BUCKET_ID is empty && exit 1; fi if [ -z "$B2_BUCKET_ID" ]; then echo B2_BUCKET_ID is empty; exit 1; fi
UPLOAD_URL=$(curl -s -H "Authorization:$B2_TOKEN" -d '{"bucketId":"$B2_BUCKET_ID"}' $apiUrl/b2api/v2/b2_get_upload_url | jq -r '.uploadUrl') UPLOAD_URL=$(curl -s -H "Authorization:$B2_TOKEN" -d '{"bucketId":"$B2_BUCKET_ID"}' $apiUrl/b2api/v2/b2_get_upload_url | jq -r '.uploadUrl')