summaryrefslogtreecommitdiffstats
path: root/tools/sqlite_dumb
blob: ba1c7dba3ce1d476bc9385657199f733868ac602 (plain)
1
2
3
4
5
6
7
8
#! /bin/bash

sqlite3  android/assets/data/rustanddust.sqlite 'select players from games order by ts desc limit 1' > players.json
sqlite3  android/assets/data/rustanddust.sqlite 'select map from games order by ts desc limit 1' > map.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