2018-05-09 05:46:10 +00:00
|
|
|
class Bat < Formula
|
|
|
|
desc "Clone of cat(1) with syntax highlighting and Git integration"
|
|
|
|
homepage "https://github.com/sharkdp/bat"
|
2018-10-18 07:32:07 +00:00
|
|
|
url "https://github.com/sharkdp/bat/archive/v0.8.0.tar.gz"
|
|
|
|
sha256 "577664399cf24695f51b702350c1a3fe460cd296a6a12ed0938bb937a4b3b00d"
|
2018-05-09 05:46:10 +00:00
|
|
|
|
2018-05-09 08:08:54 +00:00
|
|
|
bottle do
|
2018-10-20 02:35:36 +00:00
|
|
|
sha256 "f7c03e20e2e2174dbfbd459bbc9e682566ca2c2d95981e6e7a0bb16f6029376c" => :mojave
|
|
|
|
sha256 "7eae56919890dbde0df25e05cc9c8ebc5fb7200538c16fb1499d55f6c9486063" => :high_sierra
|
|
|
|
sha256 "646d4b06070a71bfa915703cfb9f57df7eafb674316decf8688dc2152f10bb70" => :sierra
|
2018-05-09 08:08:54 +00:00
|
|
|
end
|
|
|
|
|
2018-05-09 05:46:10 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "rust" => :build
|
|
|
|
|
|
|
|
def install
|
2018-08-29 12:30:39 +00:00
|
|
|
system "cargo", "install", "--root", prefix, "--path", "."
|
2018-10-14 19:48:14 +00:00
|
|
|
man1.install "doc/bat.1"
|
2018-05-09 05:46:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
pdf = test_fixtures("test.pdf")
|
|
|
|
output = shell_output("#{bin}/bat #{pdf} --color=never")
|
|
|
|
assert_match "Homebrew test", output
|
|
|
|
end
|
|
|
|
end
|