aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/wp-cli.rb
blob: a211fd74ce588b42c6828ef98d385e241e0444ee (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
25
26
27
require 'formula'

class WpCli < Formula
  homepage 'https://github.com/andreascreten/wp-cli/'

  # Use the tag instead of the tarball to get submodules
  url 'https://github.com/andreascreten/wp-cli.git', :tag => 'v0.4.0'
  version '0.4.0'

  head 'https://github.com/andreascreten/wp-cli.git'

  def install
      prefix.install Dir['src/*']
      # Install bash completion scripts for use with bash-completion
      (prefix+'etc/bash_completion.d').install 'utils/wp-completion.bash' => 'wp'
  end

  def caveats; <<-EOS.undent
    Bash completion script was installed to:
      #{etc}/bash_completion.d/wp
    EOS
  end

  def test
    system "#{bin}/wp"
  end
end