homebrew-core/Formula/bat-extras.rb

31 lines
849 B
Ruby

class BatExtras < Formula
desc "Bash scripts that integrate bat with various command-line tools"
homepage "https://github.com/eth-p/bat-extras"
url "https://github.com/eth-p/bat-extras/archive/refs/tags/v2021.08.21.tar.gz"
sha256 "15b5be9f33e2eba6ca8f27870a98ed6920a015281039bc418dafdba2a684d366"
license "MIT"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle do
rebuild 1
sha256 cellar: :any_skip_relocation, all: "c28c0829cd60e9550c340addade7ea8ce4aef1eff9b224225fb5695ead09567c"
end
depends_on "bat" => [:build, :test]
depends_on "shfmt" => :build
depends_on "ripgrep" => :test
def install
system "./build.sh", "--prefix=#{prefix}", "--minify", "all", "--install"
end
test do
system "#{bin}/prettybat < /dev/null"
system bin/"batgrep", "/usr/bin/env", bin
end
end