Skip to content

Commit 87db7f2

Browse files
committed
Address comments
1 parent 0194560 commit 87db7f2

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

dist/bin/dotr

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ addResidual () {
3636
residual_args+=("$1")
3737
}
3838

39-
run_repl=true
40-
run_app=flase
39+
addCustomClassPath () {
40+
classpath_args+=("$1:")
41+
}
42+
43+
run_repl=false
44+
4145
while [[ $# -gt 0 ]]; do
4246
key=$1
4347
case $key in
@@ -46,22 +50,28 @@ case $key in
4650
shift
4751
;;
4852
-classpath)
49-
CLASS_PATH+=":$2"
53+
addCustomClassPath "$2"
5054
shift
5155
shift
5256
;;
53-
*)
54-
addResidual "$1"
55-
shift
56-
;;
5757
-d)
5858
DEBUG="$DEBUG_STR"
5959
shift
6060
;;
61+
*)
62+
addResidual "$1"
63+
shift
64+
;;
65+
6166
esac
6267
done
6368

64-
if [ -z $residual_args ]; then
69+
CLASS_PATH="${classpath_args[@]}$CLASS_PATH"
70+
71+
if [ $run_repl == true ]; then
72+
echo "Starting dotty REPL"
73+
echo "$PROG_HOME/bin/dotc -classpath $CLASS_PATH -repl ${residual_args[@]}"
74+
elif [ -z $residual_args ]; then
6575
echo "Starting dotty REPL..."
6676
eval "$PROG_HOME/bin/dotc -repl"
6777
else

0 commit comments

Comments
 (0)