homebrew-core/Formula/rhino.rb
ilovezfs d9a75d0c99 rhino: update checksum (#18635)
and remove the gymnastics from the install method since the zip file has
been fixed.
2017-09-27 18:21:37 -07:00

21 lines
634 B
Ruby

class Rhino < Formula
desc "JavaScript engine"
homepage "https://www.mozilla.org/rhino/"
url "https://github.com/mozilla/rhino/releases/download/Rhino1_7_7_2_Release/rhino-1.7.7.2.zip"
sha256 "b223595717dd360061b35aaa7e952271fcbbd6a763a78927283480227aaa0247"
bottle :unneeded
conflicts_with "nut", :because => "both install `rhino` binaries"
def install
rhino_jar = "rhino-#{version}.jar"
libexec.install "lib/#{rhino_jar}"
bin.write_jar_script libexec/rhino_jar, "rhino"
doc.install Dir["docs/*"]
end
test do
assert_equal "42", shell_output("#{bin}/rhino -e \"print(6*7)\"").chomp
end
end