diff options
Diffstat (limited to 'pdfs/toPDF.sh')
-rwxr-xr-x | pdfs/toPDF.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pdfs/toPDF.sh b/pdfs/toPDF.sh index cfc9863..c9a35d7 100755 --- a/pdfs/toPDF.sh +++ b/pdfs/toPDF.sh @@ -34,9 +34,10 @@ case "$extension" in *) plantUmlCode="" plantUmlScriptPath="${pandocLuaScriptsFolder}/${pandocPlantUmlLuaScript}" - [ -f "$plantUmlScriptPath" ] && [ -n "$PLANTUML" ] && - grep '```{\.plantuml' "$sourceFile" >/dev/null - plantUmlCode="--lua-filter $plantUmlScriptPath" + [ -f "$plantUmlScriptPath" ] && + [ -n "$PLANTUML" ] && + grep -q '```{\.plantuml' "$sourceFile" && + plantUmlCode="--lua-filter $plantUmlScriptPath" pandoc --pdf-engine="$texengine" "$sourceFile" $plantUmlCode -o "$targetFile" > ~/logs/toPDF.log ;; esac |