From 5cdd7a93aab95c40c2843d35e56d3583ffe2d3a5 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 6 Feb 2020 21:57:59 +0100 Subject: Including ranking page links in .htaccess --- bin/datafiles-htaccess.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin/datafiles-htaccess.sh') diff --git a/bin/datafiles-htaccess.sh b/bin/datafiles-htaccess.sh index 0ac3b4e..0789b40 100755 --- a/bin/datafiles-htaccess.sh +++ b/bin/datafiles-htaccess.sh @@ -13,4 +13,7 @@ cat $CONFIG | echo "RewriteRule $PREFIX.minimal.json _data/$DATE.minimal.json [L]" >> $HTACCESS_FILE.tmp echo "RewriteRule $PREFIX.csv https://raw.githubusercontent.com/emkael/pzbs-ranking/master/data/rankings/$DATE.csv [R,L]" >> $HTACCESS_FILE.tmp done +cat $CONFIG | + jq -r '.[] | if .links then [.date, .links] else [] end | flatten | @sh' | grep -v '^$' | + xargs -L 1 bin/datafiles-htaccess-links.sh >> $HTACCESS_FILE.tmp mv $HTACCESS_FILE.tmp $HTACCESS_FILE -- cgit v1.2.3