diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-05-01 00:48:35 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-05-01 00:48:35 +0200 |
commit | 652852e3104ce4020de53231ee7691a4970439d6 (patch) | |
tree | 57a053cb2104520e240cd44a4dfb9f92fd5ede07 /tools/readgame.sh | |
parent | 156f7f8546890c6406001061dae199f8320ca83b (diff) | |
download | server-652852e3104ce4020de53231ee7691a4970439d6.tar.gz |
Add server and lobby code.
Diffstat (limited to 'tools/readgame.sh')
-rw-r--r-- | tools/readgame.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/readgame.sh b/tools/readgame.sh new file mode 100644 index 0000000..5bf93de --- /dev/null +++ b/tools/readgame.sh @@ -0,0 +1,10 @@ +#!/bin/bash +if [ -n "$1" -a -n "$2" ] +then + sqlite3 db "select writefile('$2',state) from games where game_id = $1" +elif [ -n "$1" ] +then + sqlite3 db "select state from games where game_id = $1" +else + echo "usage: bash tools/readgame.sh GAME [ state.json ]" +fi |