diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-04-25 20:01:10 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-04-25 21:16:48 +0200 |
commit | 7bcfc5845b9bfee93586f6823a0dcd3c843d0471 (patch) | |
tree | a55d0ce433a68857ccbe20fa3a7416405be4db50 | |
parent | 3ec391a75f6edad855fc218c8369b0ce52158bb0 (diff) | |
download | server-7bcfc5845b9bfee93586f6823a0dcd3c843d0471.tar.gz |
Add rtt-fetch tool for downloading game exports.
-rwxr-xr-x | bin/rtt-fetch | 18 |
1 files changed, 18 insertions, 0 deletions
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 |