diff --git a/Makefile b/Makefile deleted file mode 100644 index 165b060..0000000 --- a/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -POSTS = $(shell find ./posts -mindepth 1 -type d | sort -r) -PAGES = $(shell find ./pages -mindepth 1 -type d) - -.PHONY: all -all: - $(MAKE) index - -.PHONY: posts -posts: - for d in $(POSTS); do (echo $$d; cd $$d; $(MAKE) -f ../../m4/posts.mk); done - -.PHONY: pages -pages: - for d in $(PAGES); do (echo $$d; cd $$d; $(MAKE) -f ../../m4/posts.mk); done - -.PHONY: plain -plain: - cd ./plain; $(MAKE) - -.PHONY: clean -clean: - for d in $(POSTS); do (cd $$d; $(MAKE) -f ../../m4/posts.mk cleanposts); done - for d in $(PAGES); do (cd $$d; $(MAKE) -f ../../m4/posts.mk cleanposts); done - -rm -f toc.inc - -rm -f index.html - -.PHONY: index -index: posts pages plain - -rm -f toc.inc - for d in $(PAGES); do (cd $$d; m4 -D URL=$$d/article.html ../../m4/macros.m4 article.m4 ../../m4/indexTOCEntry.m4) >> toc.inc; done - for d in $(POSTS); do (cd $$d; m4 -D URL=$$d/article.html ../../m4/macros.m4 article.m4 ../../m4/indexTOCEntry.m4) >> toc.inc; done - m4 ./m4/macros.m4 index.m4 > index.html - -.PHONY: install -devinstall: index - rsync -av --delete --exclude-from excludes.lst . /var/www/html \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..62cc72b --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +POSTS=`find ./posts -mindepth 1 -type d | sort -r` +INDEX_TOC=`pwd`/toc.inc + + +rm -f $INDEX_TOC +for I in $POSTS; do + ( + echo $I; + cd $I; + TITLE=`cat article.html | grep '