gameserverclient/decodeanddownload.sh

15 lines
256 B
Bash
Raw Normal View History

#!/bin/bash
2017-06-03 20:59:40 +00:00
# needs better error handling, zxing returns true on fail, test with Stellar Invaders
set -e
tifftopnm <$1 2>/dev/null | pnmtojpeg >decode.jpg
URL=$(zxing decode.jpg && rm -f decode.jpg)
curl -sL $URL | sox - quick.aif
soxi -D quick.aif