diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-05-12 11:56:33 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-05-12 11:56:33 +0100 |
commit | 2a4bb211b6816b7e43b3f2c86d9236cf7919ae0e (patch) | |
tree | 40999bede00b4b05c8607672f3c34af5135f1a79 | |
parent | 6c42920c8073579ad0823dc0f3cd7a8186020a4f (diff) | |
download | gtdfh.liw.fi-2a4bb211b6816b7e43b3f2c86d9236cf7919ae0e.tar.gz |
Extract list of chapters from index.mdwn
There's no point in duplicating the list in Makefile.
-rw-r--r-- | Makefile | 19 | ||||
-rwxr-xr-x | list-chapters | 6 |
2 files changed, 7 insertions, 18 deletions
@@ -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" +} |