aboutsummaryrefslogtreecommitdiff
path: root/pdfs/toPDF.sh
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2022-09-30 20:17:30 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2022-09-30 20:17:30 +0200
commit961b77f41cb92b81a29d5011e6483835d25ba15a (patch)
treeef63a8f36d04c4e01ca9f1fead75c8ab53216024 /pdfs/toPDF.sh
parent3a30931387d425e88e0df71784dd1d9d6581f55e (diff)
downloadscripts-961b77f41cb92b81a29d5011e6483835d25ba15a.tar.gz
scripts-961b77f41cb92b81a29d5011e6483835d25ba15a.zip
Fixed an error in toPDF.sh which caused pandoc to always try running a lua script.
Diffstat (limited to 'pdfs/toPDF.sh')
-rwxr-xr-xpdfs/toPDF.sh7
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