From 652852e3104ce4020de53231ee7691a4970439d6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 1 May 2021 00:48:35 +0200 Subject: Add server and lobby code. --- tools/readgame.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tools/readgame.sh (limited to 'tools/readgame.sh') 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 -- cgit v1.2.3