build.sh 355 Bytes
Newer Older
Martin Dørum's avatar
Martin Dørum committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/bin/sh

set -e

cmark=./cmark/cmark
housecat=./housecat/housecat

build()
{
	for F in $(ls "$1"); do
		if [ -d "$1/$F" ]; then
			mkdir -p "$2/$F"
			build "$1/$F" "$2/$F"
		else
			html=$(echo "$F" | sed 's/\.md$/.html/')
			$cmark < "$1/$F" > "$2/$html"
		fi
	done
}

echo "Building..."
22
rm -rf input
Martin Dørum's avatar
Martin Dørum committed
23 24 25 26
build "content" "input"

$housecat .
echo "Done."