summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-03-21 16:05:53 +0200
committerLars Wirzenius <liw@liw.fi>2020-03-21 16:05:53 +0200
commit8227c1d98a9ae550bba534f41d9e372796a65d56 (patch)
tree5fe52e4f7b4696c110d13b1e1dba822dc4751a31
parent2de73f7e7b1448cdfc3c22dc43764072c5b9ab93 (diff)
downloadvmdb2-8227c1d98a9ae550bba534f41d9e372796a65d56.tar.gz
Change: only produce PDF if pdflatex is available
-rwxr-xr-xformat.sh27
1 files changed, 15 insertions, 12 deletions
diff --git a/format.sh b/format.sh
index 0cb04fb..aa9bf5b 100755
--- a/format.sh
+++ b/format.sh
@@ -22,15 +22,18 @@ pandoc \
-o vmdb2.html \
"$tmp/prelude.mdwn" vmdb/plugins/*.mdwn
-pandoc \
- --toc \
- --number-sections \
- -Vdocumentclass=report \
- -Vgeometry:a4paper \
- -Vfontsize:12pt \
- -Vmainfont:FreeSerif \
- -Vsansfont:FreeSans \
- -Vmonofont:FreeMonoBold \
- '-Vgeometry:top=2cm, bottom=2.5cm, left=2cm, right=1cm' \
- -o vmdb2.pdf \
- "$tmp/prelude.mdwn" vmdb/plugins/*.mdwn
+if command -v pdflatex > /dev/null
+then
+ pandoc \
+ --toc \
+ --number-sections \
+ -Vdocumentclass=report \
+ -Vgeometry:a4paper \
+ -Vfontsize:12pt \
+ -Vmainfont:FreeSerif \
+ -Vsansfont:FreeSans \
+ -Vmonofont:FreeMonoBold \
+ '-Vgeometry:top=2cm, bottom=2.5cm, left=2cm, right=1cm' \
+ -o vmdb2.pdf \
+ "$tmp/prelude.mdwn" vmdb/plugins/*.mdwn
+fi