From 7bcfc5845b9bfee93586f6823a0dcd3c843d0471 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 25 Apr 2025 20:01:10 +0200 Subject: Add rtt-fetch tool for downloading game exports. --- bin/rtt-fetch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/rtt-fetch diff --git a/bin/rtt-fetch b/bin/rtt-fetch new file mode 100755 index 0000000..ef12d91 --- /dev/null +++ b/bin/rtt-fetch @@ -0,0 +1,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 -- cgit v1.2.3