diff options
-rw-r--r-- | Makefile | 31 | ||||
-rwxr-xr-x | bin/target-ranking-files.sh | 3 |
2 files changed, 19 insertions, 15 deletions
@@ -1,26 +1,27 @@ -tmpfiles := $(patsubst %.html,%.html.tmp,$(wildcard http/*.html)) -rankfiles := $(patsubst %.html,%.html.ed,$(wildcard http/*.html)) - -$(tmpfiles): - python -m htmlmin.command $(patsubst %.tmp,%,$@) $@ - mv $@ $(patsubst %.tmp,%,$@) - -$(rankfiles): - python editions.py $(patsubst %.ed,%,$@) - all: rankings players -minimize: $(tmpfiles) - -deploy: - bin/deploy.sh +targetfiles := $(shell bin/target-ranking-files.sh config/dates.json) +tmpfiles := $(patsubst %.html,http/%.html.tmp,$(targetfiles)) +rankfiles := $(patsubst %.html,http/%.html.ed,$(targetfiles)) rankings: tables editions tables: bin/build-rankings.sh config/dates.json http -editions: $(rankfiles) +editions: tables $(rankfiles) + +$(rankfiles): + python editions.py $(patsubst %.ed,%,$@) players: bin/build-players.sh http + +minimize: $(tmpfiles) + +$(tmpfiles): + python -m htmlmin.command $(patsubst %.tmp,%,$@) $@ + mv $@ $(patsubst %.tmp,%,$@) + +deploy: + bin/deploy.sh diff --git a/bin/target-ranking-files.sh b/bin/target-ranking-files.sh new file mode 100755 index 0000000..001834f --- /dev/null +++ b/bin/target-ranking-files.sh @@ -0,0 +1,3 @@ +#!/bin/bash +CONFIG=$1 +jq -jr '.[] | .url + " "' $CONFIG |