epubcheck --devel 3.0 beta 5

Closes Homebrew/homebrew#13631.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
DJManas 2012-07-26 22:45:29 +03:00 committed by Adam Vandenberg
parent 1aa7a347b7
commit 1a7c71afb2
1 changed files with 20 additions and 7 deletions

View File

@ -5,13 +5,26 @@ class Epubcheck < Formula
url 'http://epubcheck.googlecode.com/files/epubcheck-1.2.zip'
sha1 '86036eadad8408070791b3da368958239ed8a410'
devel do
url 'http://epubcheck.googlecode.com/files/epubcheck-3.0b5.zip'
sha1 'd5f9d60733f587946fc853f561ca2f13e3b8f83d'
end
def install
if ARGV.build_devel?
libexec.install "epubcheck-3.0b5.jar", "lib"
(bin/'epubcheck').write <<-EOS.undent
#!/bin/sh
java -jar "#{libexec}/epubcheck-3.0b5.jar" "$@"
EOS
else
libexec.install "epubcheck-1.2.jar", "lib"
(bin/'epubcheck').write <<-EOS.undent
#!/bin/sh
java -jar "#{libexec}/epubcheck-1.2.jar" "$@"
EOS
end
end
def test
puts <<-EOS.undent
@ -19,7 +32,7 @@ class Epubcheck < Formula
epubcheck file.epub
The reply should look like:
Epubcheck Version 1.2
Epubcheck Version 1.2 or 3.0b5
No errors or warnings detected
EOS