summaryrefslogtreecommitdiffstats
path: root/tools/dump_payload
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-03-13 22:52:04 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-03-13 22:52:04 +0100
commit5c7ece5dbb1867dafd067a6c933f9200fdfe2b04 (patch)
tree1dbf8f709c35635a97e7568048e0eda7d93c5559 /tools/dump_payload
parent749e3221b45cd0696a5f48551be696e75b5b6e55 (diff)
downloadRustAndDust-5c7ece5dbb1867dafd067a6c933f9200fdfe2b04.zip
RustAndDust-5c7ece5dbb1867dafd067a6c933f9200fdfe2b04.tar.gz
update tools to follow SQL changes
Diffstat (limited to 'tools/dump_payload')
-rwxr-xr-xtools/dump_payload4
1 files changed, 2 insertions, 2 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