2008-06-10 08:33:28 -06:00
|
|
|
#!/usr/bin/env rc
|
2007-06-09 15:34:55 -06:00
|
|
|
|
2008-06-10 08:33:28 -06:00
|
|
|
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
|
2007-06-09 15:34:55 -06:00
|
|
|
|
2008-07-07 07:19:52 -06:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2007-06-09 15:34:55 -06:00
|
|
|
}
|