#!/bin/sh

PROGDIR=prog
if [ ! -d $PROGDIR ]; then
	mkdir $PROGDIR
	cp doc/sketchy.css $PROGDIR
fi

make_html() {
	dir=`dirname $1`
	name=`basename $1 .l`
	sed \
		-e '1,/---code---/s/^; //' \
    		-e '1,/---code---/s/^;	/	/' $dir/$name.l \
		| awk -f util/mksrc.awk \
		> $PROGDIR/$name.html
}

make_html $1

