From 42a6fccbce3e42c99471acd327e61bebfd474585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 12 Oct 2015 16:32:04 +0200 Subject: Add a Makefile to build the user guide --- Makefile | 12 ++++++++++++ templates/guide_footer.tpl | 4 ++++ templates/guide_header.tpl | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 Makefile create mode 100644 templates/guide_footer.tpl create mode 100644 templates/guide_header.tpl diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b86f1ba --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +all: + rm -rf guide/ master/ + git clone --depth 1 https://github.com/ninenines/erlang.mk master + cd master/ && make docs + mkdir guide/ + for f in master/doc/html/*.html; do \ + cp templates/guide_header.tpl guide/$${f##*/}; \ + perl -e '$$/ = undef; $$file = <>; $$file =~ s/.*(.*)<\/body>.*/\1/sg; print $$file;' $$f >> guide/$${f##*/}; \ + cat templates/guide_footer.tpl >> guide/$${f##*/}; \ + done + rm -rf master/ + git add guide/ && git commit -m "Update user guide" diff --git a/templates/guide_footer.tpl b/templates/guide_footer.tpl new file mode 100644 index 0000000..1a82220 --- /dev/null +++ b/templates/guide_footer.tpl @@ -0,0 +1,4 @@ + + + + diff --git a/templates/guide_header.tpl b/templates/guide_header.tpl new file mode 100644 index 0000000..5f70fc5 --- /dev/null +++ b/templates/guide_header.tpl @@ -0,0 +1,38 @@ + + + + +Erlang.mk + + + +
+ + + +
+
+ -- cgit v1.2.3