From 5c7ece5dbb1867dafd067a6c933f9200fdfe2b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 13 Mar 2016 22:52:04 +0100 Subject: update tools to follow SQL changes --- tools/dump_payload | 4 ++-- tools/inspect-android | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/dump_payload b/tools/dump_payload index 27ae33c..365de15 100755 --- a/tools/dump_payload +++ b/tools/dump_payload @@ -1,7 +1,7 @@ #! /bin/bash -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 games order by ts desc limit 1' > game.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 +sqlite3 android/assets/data/rustanddust.sqlite 'select payload from turns where game=(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 diff --git a/tools/inspect-android b/tools/inspect-android index e44d9ed..760b0d8 100755 --- a/tools/inspect-android +++ b/tools/inspect-android @@ -25,6 +25,6 @@ echo echo " *** GAMES ***" sqlite3 db.sqlite 'select * from games;' echo -echo " *** STATES ***" -sqlite3 db.sqlite 'select * from states;' +echo " *** TURNS ***" +sqlite3 db.sqlite 'select * from turns;' echo -- cgit v1.1-2-g2b99