diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-03-29 11:50:25 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-03-29 11:50:25 +0000 |
commit | 87617a3dc9056ec9a79c060fe46f6e301598c8ae (patch) | |
tree | c8a4f20e3849a95d64c12173a7d4b5d65ecb2a61 /manual/format-pdf | |
parent | 2dee685a1f8fb954fbeb9fd9a9d0dbb57b34b8ee (diff) | |
download | obnam-87617a3dc9056ec9a79c060fe46f6e301598c8ae.tar.gz |
Move formatting code to a shell script
Diffstat (limited to 'manual/format-pdf')
-rwxr-xr-x | manual/format-pdf | 21 |
1 files changed, 21 insertions, 0 deletions
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 <<EOF +% $TITLE +% $AUTHOR +% $VERSION +EOF + +cat 000.mdwn + +pandoc --smart --toc --chapters --number-sections -o "$OUTPUT" 000.mdwn "$@" + +rm -f 000.mdwn |