summaryrefslogtreecommitdiff
path: root/scripts/generate-all.sh
blob: 88c99bc6b8799930e46d2d4124d48c5f38236bfe (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
26
#!/bin/bash
set -e

cd "$(dirname "$0")"/jfrteamy-playoff
python=venv/bin/python

generate_playoff () {
    rm -f playoff.html
    filename=$1
    ftp_path=$2
    echo "Generating $filename to $ftp_path..."
    $python playoff.py ../../$filename.json
    echo "Uploading to $ftp_path..."
    scp playoff.html pzbs:~/liga/$ftp_path
    rm -f playoff.html
    echo "Done"
}

generate_playoff eklasa.json ekstraklasa/playoff.html
generate_playoff 1n.json 1liga/n/playoff.html
generate_playoff 1s.json 1liga/s/playoff.html
generate_playoff 2nw.json 2liga/nw/playoff.html
generate_playoff 2ne.json 2liga/ne/playoff.html
generate_playoff 2se.json 2liga/se/playoff.html
generate_playoff 2sw.json 2liga/sw/playoff.html