summaryrefslogtreecommitdiff
path: root/bin/rtt-show
blob: b643a8cd10b1a534c3d890e05f393e3ee1eb8284 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
if [ "$#" = 1 ]
then
	sqlite3 db "select json_remove(json_remove(state, '$.undo'), '$.log') from game_state where game_id = $1"
elif [ "$#" = 2 ]
then
	sqlite3 db "select state -> '$.$2' from game_state where game_id = $1"
else
	echo "usage: rtt-show GAME [ JSON-PATH ]"
fi