summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-04-25 20:01:10 +0200
committerTor Andersson <tor@ccxvii.net>2025-04-25 21:16:48 +0200
commit7bcfc5845b9bfee93586f6823a0dcd3c843d0471 (patch)
treea55d0ce433a68857ccbe20fa3a7416405be4db50
parent3ec391a75f6edad855fc218c8369b0ce52158bb0 (diff)
downloadserver-7bcfc5845b9bfee93586f6823a0dcd3c843d0471.tar.gz
Add rtt-fetch tool for downloading game exports.
-rwxr-xr-xbin/rtt-fetch18
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