From 87617a3dc9056ec9a79c060fe46f6e301598c8ae Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 29 Mar 2014 11:50:25 +0000 Subject: Move formatting code to a shell script --- manual/Makefile | 7 +++---- manual/format-pdf | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100755 manual/format-pdf (limited to 'manual') diff --git a/manual/Makefile b/manual/Makefile index f3804f9f..6b97f691 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -1,15 +1,14 @@ -TITLE = Backups with Obnam +TITLE_EN = Backups with Obnam AUTHOR = Lars Wirzenius (liw@liw.fi) VERSION = Version $(shell git describe) -en_sources = en/000.mdwn $(shell ls en/*.mdwn | grep -vFx en/000.mdwn) +en_sources = $(shell ls en/*.mdwn) outputs = obnam-manual.en.pdf obnam-manual.en.html all: $(outputs) obnam-manual.en.pdf: Makefile $(en_sources) - pandoc --smart --toc --chapters --number-sections \ - -o $@ $(en_sources) + ./format-pdf $@ "$(TITLE_EN)" "$(AUTHOR)" "$(VERSION)" $(en_sources) obnam-manual.en.html: Makefile $(en_sources) ../obnam.css pandoc -H ../obnam.css --smart --toc --chapters --number-sections \ diff --git a/manual/format-pdf b/manual/format-pdf new file mode 100755 index 00000000..137ecf9e --- /dev/null +++ b/manual/format-pdf @@ -0,0 +1,21 @@ +#!/bin/sh + +set -eu + +OUTPUT="$1" +TITLE="$2" +AUTHOR="$3" +VERSION="$4" +shift 4 + +cat > 000.mdwn <