2011-10-03 15:03:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class WpCli < Formula
|
2012-06-15 06:11:22 +00:00
|
|
|
homepage 'https://github.com/andreascreten/wp-cli/'
|
2012-06-15 22:50:01 +00:00
|
|
|
|
|
|
|
# Use the tag instead of the tarball to get submodules
|
2012-06-15 06:11:22 +00:00
|
|
|
url 'https://github.com/andreascreten/wp-cli.git', :tag => 'v0.4.0'
|
|
|
|
version '0.4.0'
|
|
|
|
|
2011-10-03 15:03:41 +00:00
|
|
|
head 'https://github.com/andreascreten/wp-cli.git'
|
|
|
|
|
|
|
|
def install
|
2012-06-15 06:11:22 +00:00
|
|
|
prefix.install Dir['src/*']
|
2011-10-10 07:02:36 +00:00
|
|
|
# Install bash completion scripts for use with bash-completion
|
2012-06-15 06:11:22 +00:00
|
|
|
(prefix+'etc/bash_completion.d').install 'utils/wp-completion.bash' => 'wp'
|
2011-10-10 07:02:36 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Bash completion script was installed to:
|
|
|
|
#{etc}/bash_completion.d/wp
|
|
|
|
EOS
|
2011-10-03 15:03:41 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/wp"
|
|
|
|
end
|
|
|
|
end
|