summaryrefslogtreecommitdiff
path: root/ausbutler-single.sh
blob: d1d4784cef2d029a18851373815f9a66e68aa365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
set -eu
TOURNAMENT=$1
cd "$(dirname "$0")"

echo "Processing $TOURNAMENT..."

set -o allexport
source configs/_common.env
source configs/$TOURNAMENT.env
set +o allexport

ls config.template | while read CONFIGFILE
do
    envsubst < config.template/$CONFIGFILE > config/$CONFIGFILE
done

python jfrteamy-ausbutler/butler.py calculate generate nowait

if command -v lftp &> /dev/null
then
    lftp -f config/send.lftp
fi

echo "Done"