dependency-check: depend on openjdk

master
Markus Reiter 2020-02-04 19:50:27 +01:00 committed by Alexander Bayandin
parent 2455939aa7
commit 15b455d939
1 changed files with 4 additions and 4 deletions

View File

@ -3,10 +3,11 @@ class DependencyCheck < Formula
homepage "https://www.owasp.org/index.php/OWASP_Dependency_Check"
url "https://dl.bintray.com/jeremy-long/owasp/dependency-check-5.3.0-release.zip"
sha256 "1af524b02cb6bb8a03ea57f6ae2880bf8db67479b92a0815b70b03051bf20743"
revision 1
bottle :unneeded
depends_on :java
depends_on "openjdk"
def install
rm_f Dir["bin/*.bat"]
@ -14,8 +15,7 @@ class DependencyCheck < Formula
chmod 0755, "bin/dependency-check.sh"
libexec.install Dir["*"]
mv libexec/"bin/dependency-check.sh", libexec/"bin/dependency-check"
bin.install_symlink libexec/"bin/dependency-check"
(bin/"dependency-check").write_env_script libexec/"bin/dependency-check.sh", :JAVA_HOME => Formula["openjdk"].opt_prefix
(var/"dependencycheck").mkpath
libexec.install_symlink var/"dependencycheck" => "data"
@ -28,7 +28,7 @@ class DependencyCheck < Formula
end
test do
output = shell_output("#{libexec}/bin/dependency-check --version").strip
output = shell_output("#{bin}/dependency-check --version").strip
assert_match "Dependency-Check Core version #{version}", output
(testpath/"temp-props.properties").write <<~EOS