aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/r.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Formula/r.rb b/Library/Formula/r.rb
index b035c83b6..fcdbc3f33 100644
--- a/Library/Formula/r.rb
+++ b/Library/Formula/r.rb
@@ -4,6 +4,13 @@ def valgrind?
ARGV.include? '--with-valgrind'
end
+class RBashCompletion < Formula
+ # This is the same script that Debian packages use.
+ url 'http://rcompletion.googlecode.com/svn-history/r12/trunk/bash_completion/R', :using => :curl
+ version 'r12'
+ md5 '3c8f6cf1c07e052074ee843be00fa5d6'
+end
+
class R < Formula
url 'http://cran.r-project.org/src/base/R-2/R-2.13.0.tar.gz'
homepage 'http://www.R-project.org/'
@@ -50,6 +57,10 @@ class R < Formula
ln_s prefix+"R.framework/Resources/bin/Rscript", bin
ln_s prefix+"R.framework/Resources/man1/R.1", man1
ln_s prefix+"R.framework/Resources/man1/Rscript.1", man1
+
+ bash_dir = prefix + 'etc/bash_completion.d'
+ bash_dir.mkpath
+ RBashCompletion.new.brew { bash_dir.install 'R' }
end
def caveats; <<-EOS.undent