2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-03 06:10:36 +00:00
|
|
|
|
|
|
|
class BashCompletion <Formula
|
2010-07-05 05:25:54 +00:00
|
|
|
url 'http://bash-completion.alioth.debian.org/files/bash-completion-1.2.tar.bz2'
|
|
|
|
homepage 'http://bash-completion.alioth.debian.org/'
|
|
|
|
md5 '88c022a98a02a02293716f840eadd884'
|
|
|
|
head 'git://git.debian.org/git/bash-completion/bash-completion.git'
|
2009-09-03 06:10:36 +00:00
|
|
|
|
|
|
|
def install
|
2010-09-13 15:50:14 +00:00
|
|
|
inreplace "bash_completion" do |s|
|
|
|
|
s.gsub! '/etc/bash_completion', "#{etc}/bash_completion"
|
2010-09-13 16:09:36 +00:00
|
|
|
s.gsub! 'readlink -f', "readlink"
|
2010-09-13 15:50:14 +00:00
|
|
|
end
|
|
|
|
|
2009-09-03 06:10:36 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2010-09-13 15:50:14 +00:00
|
|
|
def caveats; <<-EOS
|
2009-09-21 00:38:56 +00:00
|
|
|
Add the following lines to your ~/.bash_profile file:
|
2009-09-03 06:10:36 +00:00
|
|
|
if [ -f `brew --prefix`/etc/bash_completion ]; then
|
|
|
|
. `brew --prefix`/etc/bash_completion
|
|
|
|
fi
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|