35 lines
952 B
Ruby
35 lines
952 B
Ruby
class Basex < Formula
|
|
desc "Light-weight XML database and XPath/XQuery processor"
|
|
homepage "https://basex.org"
|
|
url "https://files.basex.org/releases/10.2/BaseX102.zip"
|
|
version "10.2"
|
|
sha256 "6f2c75818fedcd499d8b5db4b50cd4cb08fd5eba0bcb161531be148a590284d9"
|
|
license "BSD-3-Clause"
|
|
|
|
livecheck do
|
|
url "https://files.basex.org/releases/"
|
|
regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "78ffeeba7339dc84c5c656e05c23a7092a30bb59904cc522fa8ad431d61d1802"
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
rm Dir["bin/*.bat"]
|
|
rm_rf "repo"
|
|
rm_rf "data"
|
|
rm_rf "etc"
|
|
prefix.install_metafiles
|
|
libexec.install Dir["*"]
|
|
bin.install Dir["#{libexec}/bin/*"]
|
|
bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix
|
|
end
|
|
|
|
test do
|
|
assert_equal "1\n2\n3\n4\n5\n6\n7\n8\n9\n10", shell_output("#{bin}/basex '1 to 10'")
|
|
end
|
|
end
|