forked from keitheis/homebrew-dupes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bzip2.rb
34 lines (26 loc) · 1020 Bytes
/
bzip2.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
class Bzip2 < Formula
desc "Freely available high-quality data compressor"
homepage "http://www.bzip.org/"
url "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz"
sha256 "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
revision 1
bottle do
revision 1
sha256 "ceb1aab63302975659889ec645a55aaf4a60d93f296765eba2066c15c80ecb03" => :yosemite
sha256 "e8e0614bfb9f2db7d42d3d7111e5d0f92ab4694a6a1717b1596a46ef5daf19cf" => :mavericks
sha256 "524193536215c58e833703505bad765ce3a29388cec34c29c611f800a53f0874" => :mountain_lion
end
keg_only :provided_by_osx
def install
inreplace "Makefile", "$(PREFIX)/man", "$(PREFIX)/share/man"
system "make", "install", "PREFIX=#{prefix}"
end
test do
testfilepath = testpath + "sample_in.txt"
zipfilepath = testpath + "sample_in.txt.bz2"
testfilepath.write "TEST CONTENT"
system "#{bin}/bzip2", testfilepath
system "#{bin}/bunzip2", zipfilepath
assert_equal "TEST CONTENT", testfilepath.read
end
end