homebrew-core/Formula/bat.rb

28 lines
943 B
Ruby
Raw Normal View History

class Bat < Formula
desc "Clone of cat(1) with syntax highlighting and Git integration"
homepage "https://github.com/sharkdp/bat"
url "https://github.com/sharkdp/bat/archive/v0.10.0.tar.gz"
sha256 "54dd396e8f20d44c6032a32339f45eab46a69b6134e74a704f8d4a27c18ddc3e"
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
depends_on "rust" => :build
def install
ENV["SHELL_COMPLETIONS_DIR"] = buildpath
system "cargo", "install", "--root", prefix, "--path", "."
man1.install "doc/bat.1"
end
test do
pdf = test_fixtures("test.pdf")
output = shell_output("#{bin}/bat #{pdf} --color=never")
assert_match "Homebrew test", output
end
end