summaryrefslogtreecommitdiffstats
path: root/pkg/brew/ripgrep-bin.rb
blob: 7aac145796417205b69c9f150f2591bb471a9a52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class RipgrepBin < Formula
  version '0.8.0'
  desc "Recursively search directories for a regex pattern."
  homepage "https://github.com/BurntSushi/ripgrep"

  if OS.mac?
      url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz"
      sha256 "36a23cc8417d4ccf67a27c2abaedbd8d7c15f7ffb78aded76e967acb62d88cd2"
  elsif OS.linux?
      url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz"
      sha256 "818de1900f721ff3bb904416c70415f5a30fed0f78522e32cce61d382fdb311e"
  end

  conflicts_with "ripgrep"

  def install
    bin.install "rg"
    man1.install "doc/rg.1"

    bash_completion.install "complete/rg.bash"
    fish_completion.install "complete/rg.fish"
    zsh_completion.install "complete/_rg"
  end
end