summaryrefslogtreecommitdiff
path: root/scripts/generate-all.sh
diff options
context:
space:
mode:
authorMichaƂ Zimniewicz <michzimny@users.noreply.github.com>2018-03-08 15:31:43 +0100
committerGitHub <noreply@github.com>2018-03-08 15:31:43 +0100
commitdfac4c5c9b98547510cbb7978fb7d80e78254c42 (patch)
tree9b208abc4f26794398718e860b6f73383fb596cf /scripts/generate-all.sh
parent3b388c6dfa18e2e8abaad3a298fe272ee2341cda (diff)
Update generate-all.sh
Diffstat (limited to 'scripts/generate-all.sh')
-rwxr-xr-xscripts/generate-all.sh27
1 files changed, 13 insertions, 14 deletions
diff --git a/scripts/generate-all.sh b/scripts/generate-all.sh
index f6e64e0..88c99bc 100755
--- a/scripts/generate-all.sh
+++ b/scripts/generate-all.sh
@@ -4,24 +4,23 @@ set -e
cd "$(dirname "$0")"/jfrteamy-playoff
python=venv/bin/python
-# level = 1 or 2
-# group = "n" or "nw" or "se" or ...
generate_playoff () {
rm -f playoff.html
- level=$1
- group=$2
- echo "Generating $level$group..."
- $python playoff.py ../../$level$group.json
- echo "Uploading $level$group..."
- scp playoff.html pzbs:~/liga/${level}liga/$group/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 1 n
-generate_playoff 1 s
-generate_playoff 2 nw
-generate_playoff 2 ne
-generate_playoff 2 se
-generate_playoff 2 sw
+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