aboutsummaryrefslogtreecommitdiff
path: root/pdfs
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2020-05-16 22:54:30 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2020-05-16 22:54:30 +0200
commit1ce6627eb3c82b110eb24a28fa7697e271c21ffa (patch)
tree842b6daae670df2d64cd650f3ee8d57f46a416c5 /pdfs
parent7d68d0c122cd1a2b988f7732945f55b8d251a5e5 (diff)
downloadscripts-1ce6627eb3c82b110eb24a28fa7697e271c21ffa.tar.gz
scripts-1ce6627eb3c82b110eb24a28fa7697e271c21ffa.zip
toPDF.sh didn't check for file to actually contain plantUML diagram.
Diffstat (limited to 'pdfs')
-rwxr-xr-xpdfs/toPDF.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/pdfs/toPDF.sh b/pdfs/toPDF.sh
index 0134803..2c520a4 100755
--- a/pdfs/toPDF.sh
+++ b/pdfs/toPDF.sh
@@ -35,7 +35,8 @@ case "$extension" in
plantUmlCode=""
plantUmlScriptPath="${pandocLuaScriptsFolder}/${pandocPlantUmlLuaScript}"
[ -f "$plantUmlScriptPath" ] && [ -n "$PLANTUML" ] &&
- plantUmlCode="--lua-filter $plantUmlScriptPath"
+ grep '```{\.plantuml' "$sourceFile" >/dev/null
+ plantUmlCode="--lua-filter $plantUmlScriptPath"
pandoc --pdf-engine=xelatex "$sourceFile" $plantUmlCode -o "$targetFile" > ~/logs/toPDF.log
;;
esac