summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-10-09 10:25:30 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-10-13 19:43:07 +0100
commit09983e35984755339ce379e41d6f9dcd5587f7bf (patch)
tree75151ef1b5aaa7852c99f91a32cd9951b39ba668 /check
parent15a4c40852cca4693c8b3b483bc0280efb03cd42 (diff)
downloadsubplot-09983e35984755339ce379e41d6f9dcd5587f7bf.tar.gz
check: Add support for newer pandoc without pandoc-citeproc
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'check')
-rwxr-xr-xcheck9
1 files changed, 9 insertions, 0 deletions
diff --git a/check b/check
index 601f900..b7c5164 100755
--- a/check
+++ b/check
@@ -90,6 +90,11 @@ class Runcmd:
p = self.runcmd_unchecked(["which", name], stdout=DEVNULL)
return p.returncode == 0
+ def pandoc_is_newer(self):
+ """Is pandoc new enough for --citeproc"""
+ p = self.runcmd(["pandoc", "--help"], stdout=PIPE)
+ return "--citeproc" in p.stdout.decode("UTF-8")
+
def cargo(self, args, **kwargs):
"""Run cargo with arguments."""
self.runcmd(["cargo"] + args, **kwargs)
@@ -329,6 +334,10 @@ def check_tooling(r):
]
for command in commands:
if not r.got_command(command):
+ if command == "pandoc-citeproc":
+ if r.pandoc_is_newer():
+ r.msg(" Fortunately pandoc is new enough for --citeproc, no need for pandoc-citeproc")
+ continue
sys.exit(f"can't find {command}, which is needed for test suite")
if not r.got_command("daemonize") and not r.got_command("/usr/sbin/daemonize"):