From aa604c33c6e9c036e65f71b801bb4f2846be5d69 Mon Sep 17 00:00:00 2001 From: Keith Fahlgren Date: Tue, 3 Feb 2009 18:31:21 +0000 Subject: [PATCH] epubcheck 1.0.3 actually sets an exit code properly, so use that instead of doing nasty output regexp. --- xsl/epub/bin/lib/docbook.rb | 2 +- xsl/epub/bin/spec/epub_realbook_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xsl/epub/bin/lib/docbook.rb b/xsl/epub/bin/lib/docbook.rb index 3b622ae37..d4d06aca6 100755 --- a/xsl/epub/bin/lib/docbook.rb +++ b/xsl/epub/bin/lib/docbook.rb @@ -51,7 +51,7 @@ module DocBook cmd = "#{CHECKER} #{file}" output = `#{cmd} 2>&1` - if output == "No errors or warnings detected\n" # TODO wow.. this isn't fragile + if $?.to_i == 0 return false else STDERR.puts output if $DEBUG diff --git a/xsl/epub/bin/spec/epub_realbook_spec.rb b/xsl/epub/bin/spec/epub_realbook_spec.rb index a57149f71..f62f6f149 100755 --- a/xsl/epub/bin/spec/epub_realbook_spec.rb +++ b/xsl/epub/bin/spec/epub_realbook_spec.rb @@ -14,7 +14,7 @@ require 'spec' require 'docbook' -$DEBUG = false +$DEBUG = true TESTDOCSDIR = File.expand_path(File.join(File.dirname(__FILE__), 'files')) -- 2.40.0