44
55
66# Configuration
7- SCALA_VERSION=2.11.4
7+ SCALA_VERSION=2.11.5
88SCALA_BINARY_VERSION=2.11
99SCALA_COMPILER_VERSION=2.11.5-20141212-151631-beaa78b033
1010DOTTY_VERSION=0.1
11+ JLINE_VERSION=2.12
1112bootcp=true
1213default_java_opts=" -Xmx768m -Xms768m"
1314programName=$( basename " $0 " )
@@ -21,6 +22,7 @@ unset verbose quiet cygwin toolcp colors saved_stty CDPATH
2122
2223
2324CompilerMain=dotty.tools.dotc.Main
25+ ReplMain=test.DottyRepl
2426
2527
2628# Try to autodetect real location of the script
@@ -32,7 +34,7 @@ DOTTY_ROOT="`dirname \"$DOTTY_ROOT\"`"
3234DOTTY_ROOT=" ` ( cd \" $DOTTY_ROOT \" && pwd )` /.." # absolute
3335# autodetecting the compiler jar. this is location where sbt 'packages' it
3436MAIN_JAR=$DOTTY_ROOT /target/scala-$SCALA_BINARY_VERSION /dotty_$SCALA_BINARY_VERSION -$DOTTY_VERSION -SNAPSHOT.jar
35-
37+ TEST_JAR= $DOTTY_ROOT /target/scala- $SCALA_BINARY_VERSION /dotty_ $SCALA_BINARY_VERSION - $DOTTY_VERSION -SNAPSHOT-tests.jar
3638function checkjar {
3739 if [ ! -f " $1 " ]
3840 then
@@ -51,6 +53,7 @@ function checkjar {
5153}
5254
5355checkjar $MAIN_JAR package
56+ checkjar $TEST_JAR test:package
5457
5558# Autodetecting the scala-library location, in case it wasn't provided by an environment variable
5659if [ " $SCALA_LIBRARY_JAR " == " " ]
6871 SCALA_COMPILER_JAR=$HOME /.ivy2/cache/me.d-d/scala-compiler/jars/scala-compiler-$SCALA_COMPILER_VERSION .jar
6972fi
7073
71- if [ ! -f " $SCALA_LIBRARY_JAR " -o ! -f " $SCALA_REFLECT_JAR " -o ! -f " $SCALA_COMPILER_JAR " ]
74+ if [ " $JLINE_JAR " == " " ]
75+ then
76+ JLINE_JAR=$HOME /.ivy2//cache/jline/jline/jars/jline-$JLINE_VERSION .jar
77+ fi
78+
79+ if [ ! -f " $SCALA_LIBRARY_JAR " -o ! -f " $SCALA_REFLECT_JAR " -o ! -f " $SCALA_COMPILER_JAR " -o ! -f " $JLINE_JAR " ]
7280then
7381 echo To use this script please set
7482 echo SCALA_LIBRARY_JAR to point to scala-library-$SCALA_VERSION .jar " (currently $SCALA_LIBRARY_JAR )"
7583 echo SCALA_REFLECT_JAR to point to scala-reflect-$SCALA_VERSION .jar " (currently $SCALA_REFLECT_JAR )"
7684 echo SCALA_COMPILER_JAR to point to scala-compiler-$SCALA_VERSION .jar with bcode patches " (currently $SCALA_COMPILER_JAR )"
77-
85+ echo JLINE_JAR to point to jline- $JLINE_VERSION .jar " (currently $JLINE_JAR ) "
7886fi
7987
8088ifdebug () {
@@ -163,9 +171,9 @@ trap onExit INT
163171# to java to suppress "." from materializing.
164172classpathArgs () {
165173 if [[ -n $bootcp ]]; then
166- echo " -Xbootclasspath/a:$SCALA_LIBRARY_JAR :$SCALA_REFLECT_JAR :$SCALA_COMPILER_JAR :$MAIN_JAR -classpath $MAIN_JAR "
174+ echo " -Xbootclasspath/a:$SCALA_LIBRARY_JAR :$SCALA_REFLECT_JAR :$SCALA_COMPILER_JAR :$JLINE_JAR : $ MAIN_JAR -classpath $MAIN_JAR : $TEST_JAR "
167175 else
168- echo " -classpath $SCALA_LIBRARY_JAR :$SCALA_REFLECT_JAR :$MAIN_JAR "
176+ echo " -classpath $SCALA_LIBRARY_JAR :$SCALA_REFLECT_JAR :$SCALA_COMPILER_JAR : $JLINE_JAR : $ MAIN_JAR: $TEST_JAR "
169177 fi
170178}
171179
@@ -181,8 +189,7 @@ require_arg () {
181189}
182190
183191
184-
185-
192+ main_class=$CompilerMain
186193
187194while [[ $# -gt 0 ]]; do
188195case " $1 " in
@@ -230,7 +237,7 @@ execCommand \
230237 " ${java_args[@]} " \
231238 " $( classpathArgs) " \
232239 -Dscala.usejavacp=true \
233- " ${CompilerMain } " \
240+ " ${main_class } " \
234241 " ${scala_args[@]} " \
235242 " ${residual_args[@]} "
236243
0 commit comments