blob: 8116d48296eb63f16391c6961ca57f1e2374e599 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/bin/bash
if [ $# -eq 1 ]
then
sqlite3 -column db "select snap_id, replay_id, state->>'$.active', coalesce(state->'$.state', state->'$.L.P', 'null') from game_snap where game_id=$1"
elif [ $# -eq 2 ]
then
sqlite3 -column db "select state from game_snap where game_id=$1 and snap_id=$2"
elif [ $# -eq 3 ]
then
sqlite3 -column db "select state -> '$.$3' from game_snap where game_id=$1 and snap_id=$2"
else
echo "usage: rtt-show-snap GAME [ SNAP [ JSON-PATH ] ]"
fi
|