Handle absence of jq & base64

This commit is contained in:
folex
2019-08-18 13:48:45 +03:00
parent 0dde3bef70
commit ead031caa0
8 changed files with 27 additions and 10 deletions

View File

@ -27,7 +27,8 @@ echo -e "Sending request: $REQUEST"
echo "curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'"$REQUEST" --compressed"
echo
RESPONSE=$(curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'"$REQUEST" --compressed | jq -r .result.data | base64 -D)
RESPONSE=$(curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'"$REQUEST" --compressed)
RESPONSE=$(echo "$RESPONSE" | jq -r .result.data | base64 --decode 2>/dev/null || echo "$RESPONSE")
echo -e "$RESPONSE\n"