X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=f5149da1c312d6cbff6dfdfc0e19bbb005130ec2;hb=0463505c7b197602965764e4cfdfb335fdf2408b;hp=9f00d2b4c8be8aa477cdc4bcb1047bb679f37caa;hpb=e66f94fd99bfc3aa06e6d9c8693cc9efa7b1bfe8;p=jalview.git diff --git a/build.gradle b/build.gradle index 9f00d2b..f5149da 100644 --- a/build.gradle +++ b/build.gradle @@ -471,13 +471,20 @@ task convertBuildingMD(type: Exec) { def buildingMD = "$jalviewDir/$docDir/building.md" def css = "$jalviewDir/$docDir/github.css" - def pandoc = pandoc_exec + def pandoc = null + pandoc_exec.split(",").each { + if (file(it.trim()).exists()) { + pandoc = it.trim() + return true + } + } + def hostname = "hostname".execute().text.trim() - if (! file(pandoc).exists() && hostname.equals("jv-bamboo")) { + if ((pandoc == null || ! file(pandoc).exists()) && hostname.equals("jv-bamboo")) { pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc" } - if (file(pandoc).exists()) { + if (pandoc != null && file(pandoc).exists()) { commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD } else { commandLine "true"