diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-22 17:18:22 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-22 17:18:22 +0100 |
commit | 2cf0c9e8f96c38d86a22cd21955bc7e8444bc316 (patch) | |
tree | d36e359d9d379d43fbaa8712485164dd8b260536 /tools/sqlite_dumb | |
parent | 7ac8176f7889f6e38d10a31f94e102ed50832407 (diff) | |
download | RustAndDust-2cf0c9e8f96c38d86a22cd21955bc7e8444bc316.zip RustAndDust-2cf0c9e8f96c38d86a22cd21955bc7e8444bc316.tar.gz |
add tools/sqlite_dumb
Diffstat (limited to 'tools/sqlite_dumb')
-rwxr-xr-x | tools/sqlite_dumb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/sqlite_dumb b/tools/sqlite_dumb new file mode 100755 index 0000000..9e5c5a0 --- /dev/null +++ b/tools/sqlite_dumb @@ -0,0 +1,7 @@ +#! /bin/bash + +sqlite3 android/assets/data/rustanddust.sqlite 'select state from games order by ts desc limit 1' > state.json +sqlite3 android/assets/data/rustanddust.sqlite 'select orders from games order by ts desc limit 1' > orders.json +# echo "[" > 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 |