summaryrefslogtreecommitdiff
path: root/bin/datafiles-htaccess.sh
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2020-02-06 21:57:59 +0100
committeremkael <emkael@tlen.pl>2020-02-06 21:58:37 +0100
commit5cdd7a93aab95c40c2843d35e56d3583ffe2d3a5 (patch)
treefda422ce46ba3b047d5b07089ee58f64d2f2b4df /bin/datafiles-htaccess.sh
parent092fe36373140133efb2550722d7ce292ebd444e (diff)
Including ranking page links in .htaccess
Diffstat (limited to 'bin/datafiles-htaccess.sh')
-rwxr-xr-xbin/datafiles-htaccess.sh3
1 files changed, 3 insertions, 0 deletions
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