summaryrefslogtreecommitdiff
path: root/tools/writegame.sh
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-05-01 00:48:35 +0200
committerTor Andersson <tor@ccxvii.net>2021-05-01 00:48:35 +0200
commit652852e3104ce4020de53231ee7691a4970439d6 (patch)
tree57a053cb2104520e240cd44a4dfb9f92fd5ede07 /tools/writegame.sh
parent156f7f8546890c6406001061dae199f8320ca83b (diff)
downloadserver-652852e3104ce4020de53231ee7691a4970439d6.tar.gz
Add server and lobby code.
Diffstat (limited to 'tools/writegame.sh')
-rw-r--r--tools/writegame.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/writegame.sh b/tools/writegame.sh
new file mode 100644
index 0000000..82cff23
--- /dev/null
+++ b/tools/writegame.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+if [ -n "$1" -a -f "$2" ]
+then
+ sqlite3 db "update games set state=readfile('$2') where game_id = $1"
+else
+ echo "usage: bash tools/writegame.sh GAME state.json"
+fi