swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit 399d1eae923e8d1cc41e72ff7fae85fc077c1b18
parent 0cd60b0eb415a6cfeb67291e93a3e32ed839f4dd
Author: uriel@engel.se.cat-v.org <unknown>
Date:   Sun, 26 Oct 2008 03:37:52 +0100

Mark gensitemaptxt.rc as deprecated
Diffstat:
Abin/aux/gensitemaptxt.rc | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/bin/aux/gensitemaptxt.rc b/bin/aux/gensitemaptxt.rc @@ -0,0 +1,14 @@ +#!/usr/bin/env rc +# DEPRECATED: sitemap.tpl now generates and updates a sitemap.txt when requested, and is also more smart than this simplistic script. + +for ( d in sites/*/ ) { +echo $d +9 du -a $d | awk '/\.(md|html)$/ { print $2 }; {}' | 9 sed -e 's/\.(md|html)$//' -e 's,/index$,/,' -e 's,^sites/,http://,' > $d/sitemap.txt + +if(! test -f $d/robots.txt) { + echo generating missing robots.txt for $d + echo $d|sed 's,sites/,Sitemap: http://,; s/$/sitemap.txt/;' > $d/robots.txt + cat $d/robots.txt +} + +}