aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/epubcheck.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/epubcheck.rb')
-rw-r--r--Library/Formula/epubcheck.rb28
1 files changed, 3 insertions, 25 deletions
diff --git a/Library/Formula/epubcheck.rb b/Library/Formula/epubcheck.rb
index e75c2c402..0d8226fa1 100644
--- a/Library/Formula/epubcheck.rb
+++ b/Library/Formula/epubcheck.rb
@@ -11,30 +11,8 @@ class Epubcheck < Formula
end
def install
- if 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
- To test epubcheck, find a epub file that doesn't have any errors and then:
- epubcheck file.epub
-
- The reply should look like:
- Epubcheck Version 1.2 or 3.0b5
-
- No errors or warnings detected
- EOS
+ jarname = build.devel? ? "epubcheck-3.0b5.jar" : "epubcheck-1.2.jar"
+ libexec.install jarname, "lib"
+ bin.write_jar_script libexec/jarname, 'epubcheck'
end
end