forked from keitheis/homebrew-dupes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiffstat.rb
43 lines (40 loc) · 1.61 KB
/
diffstat.rb
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
31
32
33
34
35
36
37
38
39
40
41
42
43
class Diffstat < Formula
desc "Produce graph of changes introduced by a diff file"
homepage "http://invisible-island.net/diffstat/"
url "https://mirrors.kernel.org/debian/pool/main/d/diffstat/diffstat_1.60.orig.tar.gz"
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/diffstat/diffstat_1.60.orig.tar.gz"
sha256 "2032e418b43bae70d548e32da901ebc4ac12972381de1314bebde0b126fb0123"
bottle do
cellar :any_skip_relocation
revision 1
sha256 "a668a1005bd2637d1e8d53981e7ab245d436f5edf12aaf3d50b9586dc2c34d60" => :el_capitan
sha256 "e0c5096b5a5a8a9fba502479897950c3d040aeb6026c7907a8a49320b0d15012" => :yosemite
sha256 "d70bbd3435223cafaaf268ed55ef4152a56ff03daee138775561a6d96ef51e1c" => :mavericks
end
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"diff.diff").write <<-EOS.undent
diff --git a/diffstat.rb b/diffstat.rb
index 596be42..5ff14c7 100644
--- a/diffstat.rb
+++ b/diffstat.rb
@@ -2,9 +2,8 @@
- url 'http://invisible-island.net/datafiles/release/diffstat.tar.gz'
- version '1.58'
- sha1 '7a67ecb996ea65480bd0b9db33d8ed458e5f2a24'
+ url 'ftp://invisible-island.net/diffstat/diffstat-1.58.tgz'
+ sha256 'fad5135199c3b9aea132c5d45874248f4ce0ff35f61abb8d03c3b90258713793'
EOS
output = `#{bin}/diffstat diff.diff`
diff = <<-EOS
diffstat.rb | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
EOS
assert_equal diff, output
end
end