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"
|
2019-02-08 16:05:13 +00:00
|
|
|
url "https://github.com/sharkdp/bat/archive/v0.10.0.tar.gz"
|
|
|
|
sha256 "54dd396e8f20d44c6032a32339f45eab46a69b6134e74a704f8d4a27c18ddc3e"
|
2018-05-09 05:46:10 +00:00
|
|
|
|
2018-05-09 08:08:54 +00:00
|
|
|
bottle do
|
2019-01-09 12:23:52 +00:00
|
|
|
cellar :any_skip_relocation
|
2019-02-08 19:39:52 +00:00
|
|
|
sha256 "36855c4b2616e0ef2fda032a1afc71f6be5abb6dee6c38376072cab1fd2b7e4f" => :mojave
|
|
|
|
sha256 "8a661ac036f0419b2959386eda537decb58b6bd614bd95bf7baeabed2287263d" => :high_sierra
|
|
|
|
sha256 "4a64a65453b1301cb01a784d8f5f1857f6904b7963032756a948ba79efc2bf51" => :sierra
|
2018-05-09 08:08:54 +00:00
|
|
|
end
|
|
|
|
|
2018-05-09 05:46:10 +00:00
|
|
|
depends_on "rust" => :build
|
|
|
|
|
|
|
|
def install
|
2019-01-09 11:26:16 +00:00
|
|
|
ENV["SHELL_COMPLETIONS_DIR"] = buildpath
|
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
|