blob: 27ae33cd9552db877318f908fd8cc6ec983ad077 (
plain)
1
2
3
4
5
6
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 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
|