shithub: werc

Download patch

ref: ffef948ac2c762e99985973f8f1bc5218d5d94a3
parent: 07f704470d7cbbeebec196fafcab408a7480d625
author: uriel <[email protected]>
date: Sat Oct 25 23:37:52 EDT 2008

Mark gensitemaptxt.rc as deprecated

--- /dev/null
+++ b/bin/aux/gensitemaptxt.rc
@@ -1,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
+}
+
+}