Skip to content

Commit 330e41b

Browse files
committed
add brew script for install on Mac
1 parent f49ec19 commit 330e41b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

dist/dotty.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
class Dotty < Formula
2+
desc "Experimental Scala Compiler"
3+
homepage "http://dotty.epfl.ch/"
4+
url "http://dotty.epfl.ch/dotty/dotty-0.1.1-bin-SNAPSHOT.tar.gz"
5+
sha256 "4e1bda148754543844d25290a87076e6bfb0b6b0275535f97c1871e0fc5c2c4c"
6+
# mirror "https://downloads.typesafe.com/scala/2.12.2/scala-2.12.2.tgz"
7+
# mirror "https://www.scala-lang.org/files/archive/scala-2.12.2.tgz"
8+
9+
bottle :unneeded
10+
11+
depends_on :java => "1.8+"
12+
13+
def install
14+
rm_f Dir["bin/*.bat"]
15+
prefix.install "bin", "lib"
16+
end
17+
18+
test do
19+
file = testpath/"Test.scala"
20+
file.write <<-EOS.undent
21+
object Test {
22+
def main(args: Array[String]) {
23+
println(s"${2 + 2}")
24+
}
25+
}
26+
EOS
27+
28+
out = shell_output("#{bin}/dotr #{file}").strip
29+
30+
assert_equal "4", out
31+
end
32+
end

0 commit comments

Comments
 (0)