File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 3
3
# it's based on miniboxing script and paulp's launcher script
4
4
5
5
# Try to autodetect real location of the script
6
- DOTTY_ROOT=" ` readlink \ "$0 \" ` " # relative, symbolic links resolved
6
+ DOTTY_ROOT=" $( readlink " $0 " ) " # relative, symbolic links resolved
7
7
if [[ " $DOTTY_ROOT " == " " ]]; then
8
8
DOTTY_ROOT=" $0 "
9
9
fi
10
- DOTTY_ROOT=" ` dirname \ "$DOTTY_ROOT \" ` "
11
- DOTTY_ROOT=" ` ( cd \ "$DOTTY_ROOT \ " >& /dev/null && pwd )` /.." # absolute
10
+ DOTTY_ROOT=" $( dirname " $DOTTY_ROOT " ) "
11
+ DOTTY_ROOT=" $ ( cd " $DOTTY_ROOT " >& /dev/null && pwd ) /.." # absolute
12
12
13
13
# Finds in dotty build file a line containing PATTERN
14
14
# returns last "" escaped string in this line
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Try to autodetect real location of the script
4
+ DOTTY_ROOT=" $( readlink " $0 " ) " # relative, symbolic links resolved
5
+ if [[ " $DOTTY_ROOT " == " " ]]; then
6
+ DOTTY_ROOT=" $0 "
7
+ fi
8
+ DOTTY_ROOT=" $( dirname " $DOTTY_ROOT " ) "
9
+ DOTTY_ROOT=" $( cd " $DOTTY_ROOT " >& /dev/null && pwd ) /.." # absolute
10
+
11
+ # CLASS_PATH is derived from the DOTTY_ROOT
12
+ CLASS_PATH=" -J-Xbootclasspath/a:.:$DOTTY_ROOT /target/scala-2.11/classes/"
13
+
14
+ function runMain {
15
+ scala $CLASS_PATH $@
16
+ }
17
+
18
+ if [ -z " $1 " ]; then
19
+ echo " Starting dotty REPL..."
20
+ eval " $DOTTY_ROOT /bin/dotc -repl"
21
+ else
22
+ runMain " $@ "
23
+ fi
You can’t perform that action at this time.
0 commit comments