#!/bin/sh set -x set -e mono --debug lb.exe mkdir -p www/archive cd archive for f in */*.html ; do year=`dirname $f` day=`basename $f .html` mkdir -p ../www/archive/$year (cat $f; echo "

Comments

")> ../www/archive/$year/$day.head.html sed -e "s/@YEAR@/$year/; s/@DAY@/$day/" ../comments.foot.html > \ ../www/archive/$year/$day.foot.html touch ../www/archive/$year/$day.body.html cat ../www/archive/$year/$day.{head,body,foot}.html > ../www/archive/$year/$day.html done cd .. cat index.foot.html >> index.html cp *html *rss2 www/ chmod 666 www/archive/*/*.html chmod 644 www/*html www/*rss2