summaryrefslogtreecommitdiff
path: root/bin/rtt-fetch
blob: ef12d9165ddb7039abf5341119baeb25644510a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

if [ $# -eq 2 ]
then
	SERVER=$1
	GAME=$2
elif [ $# -eq 1 ]
then
	SERVER=https://rally-the-troops.com
	GAME=$1
else
	echo 'usage: rtt-fetch [ SERVER ] GAME'
	exit 1
fi

FILE=game-$GAME.json

curl -s -S -f -o $FILE -b cookies.txt -L $SERVER/api/export/$GAME && echo $FILE