diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-05-12 10:35:39 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-05-26 11:54:15 +0200 |
commit | 5004ae26f167dc30530e65f763af673bac158ebc (patch) | |
tree | 102d80bbd02898ebbacc262cc6bd9b9c90e9e1a9 /bin | |
parent | be3e84bd0983f01dde5c44f4eb8f749a12ad2159 (diff) | |
download | dotty-5004ae26f167dc30530e65f763af673bac158ebc.tar.gz dotty-5004ae26f167dc30530e65f763af673bac158ebc.tar.bz2 dotty-5004ae26f167dc30530e65f763af673bac158ebc.zip |
Start REPL on no args in dotty script, fix backticks
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dotc | 6 | ||||
-rwxr-xr-x | bin/dottyr (renamed from bin/dotty) | 12 |
2 files changed, 8 insertions, 10 deletions
@@ -3,12 +3,12 @@ # it's based on miniboxing script and paulp's launcher script # Try to autodetect real location of the script -DOTTY_ROOT="`readlink \"$0\"`" # relative, symbolic links resolved +DOTTY_ROOT="$(readlink "$0")" # relative, symbolic links resolved if [[ "$DOTTY_ROOT" == "" ]]; then DOTTY_ROOT="$0" fi -DOTTY_ROOT="`dirname \"$DOTTY_ROOT\"`" -DOTTY_ROOT="`( cd \"$DOTTY_ROOT\" >& /dev/null && pwd )`/.." # absolute +DOTTY_ROOT="$(dirname "$DOTTY_ROOT")" +DOTTY_ROOT="$( cd "$DOTTY_ROOT" >& /dev/null && pwd )/.." # absolute # Finds in dotty build file a line containing PATTERN # returns last "" escaped string in this line @@ -1,12 +1,12 @@ #!/bin/bash # Try to autodetect real location of the script -DOTTY_ROOT="`readlink \"$0\"`" # relative, symbolic links resolved +DOTTY_ROOT="$(readlink "$0")" # relative, symbolic links resolved if [[ "$DOTTY_ROOT" == "" ]]; then DOTTY_ROOT="$0" fi -DOTTY_ROOT="`dirname \"$DOTTY_ROOT\"`" -DOTTY_ROOT="`( cd \"$DOTTY_ROOT\" && pwd )`/.." # absolute +DOTTY_ROOT="$(dirname "$DOTTY_ROOT")" +DOTTY_ROOT="$( cd "$DOTTY_ROOT" && pwd )/.." # absolute # CLASS_PATH is derived from the DOTTY_ROOT CLASS_PATH="-J-Xbootclasspath/a:.:$DOTTY_ROOT/target/scala-2.11/classes/" @@ -16,10 +16,8 @@ function runMain { } if [ -z "$1" ]; then - echo "usage: $0 MainClass args" - echo "" - echo " missing class argument" - exit 1 + echo "Starting dotty REPL..." + eval "$DOTTY_ROOT/bin/dotc -repl" else runMain "$@" fi |