blob: e409d688129c0d97bb0088114d5597eeb03d9536 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 | class Zdelta < Formula
  homepage "http://cis.poly.edu/zdelta/"
  url "http://cis.poly.edu/zdelta/downloads/zdelta-2.1.tar.gz"
  sha256 "03e6beb2e1235f2091f0146d7f41dd535aefb6078a48912d7d11973d5306de4c"
  head "https://github.com/snej/zdelta.git"
  def install
    system "make", "test", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}"
    system "make", "install", "prefix=#{prefix}"
    bin.install "zdc", "zdu"
  end
  test do
    msg = "Hello this is Homebrew"
    (testpath/"ref").write "Hello I'm a ref file"
    compressed = pipe_output("#{bin}/zdc ref", msg, 0)
    assert_equal msg, pipe_output("#{bin}/zdu ref", compressed, 0)
  end
end
 |