From: Ben Soares Date: Tue, 11 Jun 2019 14:05:38 +0000 (+0100) Subject: JAL-3248 improved pandoc lookup. Now comma-separated value in pandoc_exe in gradle... X-Git-Tag: Release_2_11_0~7^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7285f6b980f6634b6f0060e97781cbc8e3a936b0;p=jalview.git JAL-3248 improved pandoc lookup. Now comma-separated value in pandoc_exe in gradle.properties --- diff --git a/build.gradle b/build.gradle index 9fbcd38..94481e9 100644 --- a/build.gradle +++ b/build.gradle @@ -465,13 +465,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" diff --git a/gradle.properties b/gradle.properties index 1189f12..3d37b3f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -111,6 +111,6 @@ JSIGN_SH = echo eclipse_extra_jdt_prefs_file = .settings/org.eclipse.jdt.core.jalview.prefs -pandoc_exec = /usr/local/bin/pandoc +pandoc_exec = /usr/local/bin/pandoc,/usr/bin/pandoc dev = false