From 9312b112dec178b6689bab6d2b662cc2d8b08c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 3 Mar 2016 13:53:39 +0100 Subject: tools/dump_payload: generate turns.json --- tools/dump_payload | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/dump_payload b/tools/dump_payload index e03beb6..27ae33c 100755 --- a/tools/dump_payload +++ b/tools/dump_payload @@ -2,3 +2,6 @@ sqlite3 android/assets/data/rustanddust.sqlite 'select payload from states where _g=(select _id from games order by ts desc limit 1)' > state.json sqlite3 android/assets/data/rustanddust.sqlite 'select payload from turns where _id=(select max(_id) from turns)' > turn.json +echo "[" > turns.json +sqlite3 android/assets/data/rustanddust.sqlite 'select payload from turns where _g=(select _id from games order by ts desc limit 1) order by _id' | while read rec; do echo "$rec,"; done >> turns.json +sed -i '$s/,$/]/' turns.json -- cgit v1.1-2-g2b99