miller 2.2.1 (new formula)
Closes Homebrew/homebrew#44307. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
parent
838dde3ffc
commit
0099cd819d
1 changed files with 33 additions and 0 deletions
33
Formula/miller.rb
Normal file
33
Formula/miller.rb
Normal file
|
@ -0,0 +1,33 @@
|
|||
class Miller < Formula
|
||||
desc "Like sed, awk, cut, join & sort for name-indexed data such as CSV"
|
||||
homepage "https://github.com/johnkerl/miller"
|
||||
url "https://github.com/johnkerl/miller/releases/download/v2.2.1/mlr-2.2.1.tar.gz"
|
||||
sha256 "2e85b0a2beb295174a4346f98dec79573394064c1fc2f004fe6816feefb0ddbe"
|
||||
|
||||
head do
|
||||
url "https://github.com/johnkerl/miller.git"
|
||||
|
||||
depends_on "automake" => :build
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
def install
|
||||
system "autoreconf", "-fvi" if build.head?
|
||||
system "./configure", "--prefix=#{prefix}", "--disable-silent-rules",
|
||||
"--disable-dependency-tracking"
|
||||
system "make"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.csv").write <<-EOS.undent
|
||||
a,b,c
|
||||
1,2,3
|
||||
4,5,6
|
||||
EOS
|
||||
output = pipe_output("#{bin}/mlr --csvlite cut -f a test.csv")
|
||||
assert_match /a\n1\n4\n/, output
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue