blob: 4a8fdbd09fd3365c1d37867515b6cba5e81f0b1c (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/bin/bash
if [ -n "$1" -a -n "$2" ]
then
sqlite3 db "select writefile('$2',state) from game_state where game_id = $1"
elif [ -n "$1" ]
then
sqlite3 db "select state from game_state where game_id = $1"
else
echo "usage: bash tools/readgame.sh GAME [ state.json ]"
fi
|