JAL-3248 improved pandoc lookup. Now comma-separated value in pandoc_exe in gradle...
authorBen Soares <bsoares@dundee.ac.uk>
Tue, 11 Jun 2019 14:05:38 +0000 (15:05 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Tue, 11 Jun 2019 14:05:38 +0000 (15:05 +0100)
build.gradle
gradle.properties

index 9fbcd38..94481e9 100644 (file)
@@ -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"
index 1189f12..3d37b3f 100644 (file)
@@ -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