diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-05-25 20:52:06 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-06-05 11:45:00 +0200 |
commit | ab74f660dd0301995d2b71be27e89764e1ee4b5e (patch) | |
tree | b2a01bc8fc67af82486ba59479678fd26db6d49f /tools/readgame.sh | |
parent | bd6644214c757a08c1c533048352a902fdefe4ae (diff) | |
download | server-ab74f660dd0301995d2b71be27e89764e1ee4b5e.tar.gz |
Remove stale stuff.
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..4a8fdbd --- /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 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 |