From b7203d4904a3e163f46f853f4902260526c854d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralf=20D=2E=20M=C3=BCller?= Date: Sun, 4 Nov 2018 11:39:43 +0100 Subject: [PATCH] #222 pandoc --- scripts/pandoc.gradle | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/pandoc.gradle b/scripts/pandoc.gradle index 3a7b6c150..4e8ded091 100644 --- a/scripts/pandoc.gradle +++ b/scripts/pandoc.gradle @@ -12,12 +12,14 @@ task convertToDocx ( workingDir "$targetDir/docbook" executable = "pandoc" - new File("$targetDir/docx/").mkdirs() args = ['-r','docbook', '-t','docx', '-o',"../docx/$targetFile", sourceFile] - } + } + doFirst { + new File("$targetDir/docx/").mkdirs() + } } //end::convertToDocx[] @@ -35,13 +37,15 @@ task convertToEpub ( workingDir "$targetDir/docbook" executable = "pandoc" - new File("$targetDir/epub/").mkdirs() args = ['-r','docbook', '-t','epub', '-o',"../epub/$targetFile", sourceFile] } + doFirst { + new File("$targetDir/epub/").mkdirs() + } } //end::convertToEpub[] project.afterEvaluate {