Skip to content

Instantly share code, notes, and snippets.

@quard8
Created April 27, 2014 16:51
Show Gist options
  • Save quard8/11350242 to your computer and use it in GitHub Desktop.
Save quard8/11350242 to your computer and use it in GitHub Desktop.
scala 2.9.3 for homebrew
require 'formula'
class ScalaDocs < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/files/archive/scala-docs-2.9.3.zip'
sha1 '5bf44bd04b2b37976bde5d4a4c9bb6bcdeb10eb2'
end
class ScalaCompletion < Formula
homepage 'http://www.scala-lang.org/'
url 'https://raw.github.com/scala/scala-dist/27bc0c25145a8/completion.d/2.9.1/scala'
version '2.9.1'
sha1 'e2fd99fe31a9fb687a2deaf049265c605692c997'
end
class Scala < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/files/archive/scala-2.9.3.tgz'
sha1 '01bf9e2c854e2385b2bcef319840415867a00388'
def options
[['--with-docs', 'Also install library documentation']]
end
def install
rm_f Dir["bin/*.bat"]
doc.install Dir['doc/*']
man1.install Dir['man/man1/*']
libexec.install Dir['*']
bin.install_symlink Dir["#{libexec}/bin/*"]
ScalaCompletion.new.brew { (prefix+'etc/bash_completion.d').install 'scala' }
ScalaDocs.new.brew { doc.install Dir['*'] } if ARGV.include? '--with-docs'
end
def caveats; <<-EOS.undent
Bash completion has been installed to:
#{etc}/bash_completion.d
EOS
end
end
@quard8
Copy link
Author

quard8 commented Apr 27, 2014

brew install https://gist.githubusercontent.com/quard8/11350242/raw/b0829e4ce020a229738faeceb3e42ccb7c7d3da6/scala.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment