1class RipgrepBin < Formula 2 version '12.1.1' 3 desc "Recursively search directories for a regex pattern." 4 homepage "https://github.com/BurntSushi/ripgrep" 5 6 if OS.mac? 7 url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz" 8 sha256 "7ff2fd5dd3a438d62fae5866ddae78cf542b733116f58cf21ab691a58c385703" 9 elsif OS.linux? 10 url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz" 11 sha256 "88d3b735e43f6f16a0181a8fec48847693fae80168d5f889fdbdeb962f1fc804" 12 end 13 14 conflicts_with "ripgrep" 15 16 def install 17 bin.install "rg" 18 man1.install "doc/rg.1" 19 20 bash_completion.install "complete/rg.bash" 21 zsh_completion.install "complete/_rg" 22 end 23end 24