Last active
February 2, 2018 11:52
-
-
Save josgraha/e21fc8b5d9e85b436d912fbce4ce9640 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to install the latest stable version: | |
brew install scala --with-docs | |
# to install scala-2.10: | |
brew install https://raw.github.com/gist/4340744/scala.rb --with-docs | |
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands): | |
brew switch scala 2.9.2 | |
brew switch scala 2.10.0 | |
# to see which scala you're currently using: | |
brew which scala |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recipe for scala-2.10.6 | |
require 'formula' | |
class ScalaDocs < Formula | |
homepage 'http://www.scala-lang.org/' | |
url 'http://www.scala-lang.org/downloads/distrib/files/scala-docs-2.10.6.zip' | |
sha1 '5bf44bd04b2b37976bde5d4a4c9bb6bcdeb10eb2' | |
end | |
class ScalaCompletion < Formula | |
homepage 'http://www.scala-lang.org/' | |
url 'https://raw.github.com/scala/scala-dist/27bc0c25145a83691e3678c7dda602e765e13413/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/downloads/distrib/files/scala-2.10.6.tgz' | |
sha1 '87f605a186aa0e4435b302fb9af575513d29249a' | |
version '2.10.6' | |
option 'with-docs', 'Also install library documentation' | |
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 build.include? 'with-docs' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment