#!/bin/sh

[ -n "$1" ] || { echo "$0 <blueprint file>"; exit -1; }

blueprint=$1
json=${blueprint%.*}.json
jsonf=${blueprint%.*}-formatted.json

cat $blueprint | tail -c +2 | base64 -i -d | openssl zlib -d > ${json}
cat ${json} | jq > $jsonf
