homebrew-core/Formula/bat-extras.rb

30 lines
835 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/v2022.07.27.tar.gz"
sha256 "ee6950c7478049646496af5463f9c4114db8938706c13d91ad41f4f16dd241ea"
license "MIT"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "717ad828da58e7d7aa1ce4a091c9bd6fbb26fefcf4ce4f67eea52a7001df5f92"
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