summaryrefslogtreecommitdiff
path: root/manual/format-pdf
diff options
context:
space:
mode:
Diffstat (limited to 'manual/format-pdf')
-rwxr-xr-xmanual/format-pdf21
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