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-11-12 16:59:50 +00:00
|
|
|
url "https://github.com/sharkdp/bat/archive/v0.9.0.tar.gz"
|
|
|
|
sha256 "4ce9c118cf5da1159a882dea389f3c5737b5d98192e9a619b0fe8c1730341cc6"
|
2019-01-09 11:26:16 +00:00
|
|
|
revision 1
|
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
|
|
|
|
sha256 "b73b3750305ce75d86af0e7c6c31878dddd08c19fb2adc827a973f91aba74bff" => :mojave
|
|
|
|
sha256 "4c48c3127468bab8196f54a7e5325c89c85ad2f58872a964d05ef28598bdb3ce" => :high_sierra
|
|
|
|
sha256 "6d9585120bc2f93706a9761071d54a917c7d24a66bbcbcdcc267a6747f47d872" => :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"
|
2019-01-09 11:26:16 +00:00
|
|
|
bash_completion.install "bat.bash"
|
|
|
|
fish_completion.install "bat.fish"
|
|
|
|
zsh_completion.install "_bat"
|
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
|