summaryrefslogtreecommitdiff
path: root/tools/undo.sh
blob: 3cd5b4afccbb390c2c4a9a0ee7209d6ce89c39cf (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
if [ -n "$1" ]
then
	RID=$(sqlite3 db "select replay_id from game_replay where game_id=$1 order by replay_id desc limit 1")
	echo $RID
	sqlite3 db "delete from game_replay where game_id=$1 and replay_id=$RID"
	node tools/patchgame.js $1
else
	echo "usage: bash tools/undo.sh GAME"
fi