blob: 7e600c1d4249824e59d395e2d92fd1f746386659 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 | class Duck < Formula
  homepage "https://duck.sh/"
  url "https://dist.duck.sh/duck-src-4.7.17432.tar.gz"
  sha1 "100996ffbabf2586eb149efd3097b4af20efa728"
  head "https://svn.cyberduck.io/trunk/"
  bottle do
    cellar :any
    sha1 "c0439df03eaf84f6b8a446b5207963e4ca35609b" => :yosemite
    sha1 "b8e8a45673394a7034e63e5514eac65a122bdc16" => :mavericks
    sha1 "be719af049e6b39490554f8e1ba916c2b7de77ea" => :mountain_lion
  end
  depends_on :java => ["1.7+", :build]
  depends_on :xcode => :build
  depends_on "ant" => :build
  def install
    revision = version.to_s.rpartition(".").last
    system "ant", "-Dbuild.compile.target=1.7", "-Drevision=#{revision}", "cli"
    libexec.install Dir["build/duck.bundle/*"]
    bin.install_symlink "#{libexec}/Contents/MacOS/duck" => "duck"
  end
  test do
    filename = (testpath/"test")
    system "#{bin}/duck", "--download", stable.url, filename
    filename.verify_checksum stable.checksum
  end
end
 |