2011-10-03 15:03:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class WpCli < Formula
|
2011-10-10 07:02:36 +00:00
|
|
|
url 'https://github.com/downloads/andreascreten/wp-cli/wp-cli-0.2.zip'
|
|
|
|
homepage 'https://github.com/downloads/andreascreten/wp-cli/'
|
2011-10-03 15:03:41 +00:00
|
|
|
head 'https://github.com/andreascreten/wp-cli.git'
|
2011-10-10 07:02:36 +00:00
|
|
|
md5 '2de14d7f39c746923cf87283f1f31ffb'
|
2011-10-03 15:03:41 +00:00
|
|
|
|
|
|
|
def install
|
2011-10-10 07:02:36 +00:00
|
|
|
prefix.install Dir['wp-cli/*']
|
|
|
|
# Install bash completion scripts for use with bash-completion
|
|
|
|
(prefix+'etc/bash_completion.d').install prefix+'bin/wp-cli-completion.bash' => 'wp'
|
|
|
|
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
|