forked from sjackman/linuxbrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
afio.rb
39 lines (33 loc) · 1.25 KB
/
afio.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
class Afio < Formula
desc "Creates cpio-format archives"
homepage "https://github.com/kholtman/afio"
url "https://github.com/kholtman/afio/archive/v2.5.2.tar.gz"
sha256 "c64ca14109df547e25702c9f3a9ca877881cd4bf38dcbe90fbd09c8d294f42b9"
head "https://github.com/kholtman/afio.git"
bottle do
cellar :any_skip_relocation
rebuild 1
sha256 "28494133d10acea2c1a298fe858d26889ba8567422b9f431710b156a4a8ac858" => :catalina
sha256 "733a4169a7be82dc173cc302994ad205493a9085580634b92faa38c96c84608b" => :mojave
sha256 "53dbb826f2c3e050bd70078945d92772a4c434b0aa75e1a71cb29e56ed8e62fa" => :high_sierra
sha256 "16d40fe84882c72ac33669b7aad35d8266f227a4e4322104c2de094040d332a6" => :x86_64_linux
end
def install
system "make", "DESTDIR=#{prefix}"
bin.install "afio"
man1.install "afio.1"
prefix.install "ANNOUNCE-2.5.1" => "ANNOUNCE"
prefix.install %w[INSTALLATION SCRIPTS]
share.install Dir["script*"]
end
test do
path = testpath/"test"
path.write "homebrew"
pipe_output("#{bin}/afio -o archive", "test\n")
system "#{bin}/afio", "-r", "archive"
path.unlink
system "#{bin}/afio", "-t", "archive"
system "#{bin}/afio", "-i", "archive"
assert_equal "homebrew", path.read.chomp
end
end