From 0fa0fdebf092fb1eeb08644014d0dc57ff486e49 Mon Sep 17 00:00:00 2001 From: Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: site generation --- gen | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 gen (limited to 'gen') diff --git a/gen b/gen new file mode 100755 index 0000000..16a79fa --- /dev/null +++ b/gen @@ -0,0 +1,18 @@ +#!/usr/bin/env sh +# generate site +find -name "m.htm" -exec sh -c ' + title=$(head -n1 ${1%/*}/m.htm | cut -d, -f1) + subdir=$(head -n1 ${1%/*}/m.htm | cut -d, -f2) + redirect=$(head -n1 ${1%/*}/m.htm | cut -d, -f3) + (cat h.htm; tail -n+2 ${1%/*}/m.htm; cat f.htm) >${1%/*}/index.html + sed -i "s,