summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rwxr-xr-xlist-chapters6
2 files changed, 7 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index ca551f8..ee5da77 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,4 @@
-chapters = \
- introduction.mdwn \
- quickie-overview.mdwn \
- inboxes.mdwn \
- projects-next-actions.mdwn \
- doing.mdwn \
- calendars.mdwn \
- journalling.mdwn \
- files.mdwn \
- someday-maybe.mdwn \
- waiting-for.mdwn \
- daily-routine.mdwn \
- review.mdwn \
- automation.mdwn \
- getting-started.mdwn \
- ungood.mdwn \
- conclusion.mdwn \
- references.mdwn
+chapters = $(shell ./list-chapters index.mdwn)
all: book.pdf book.epub book.mobi
diff --git a/list-chapters b/list-chapters
new file mode 100755
index 0000000..55daa28
--- /dev/null
+++ b/list-chapters
@@ -0,0 +1,6 @@
+#!/usr/bin/awk -f
+
+$2 == "[[!traillink" {
+ sub(/\]\].*/, " ")
+ print tolower($3) ".mdwn"
+}