diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-06-21 20:02:42 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-06-21 20:07:04 +0200 |
commit | 574681ebf468642ce55a6aa06c66daee6b8d3742 (patch) | |
tree | 1129fae3ca7d656623ca5ae2c274648077aa3b36 /bin/dotr | |
parent | 156066d4aa03619c58a3197550cf998c5b67343a (diff) | |
download | dotty-574681ebf468642ce55a6aa06c66daee6b8d3742.tar.gz dotty-574681ebf468642ce55a6aa06c66daee6b8d3742.tar.bz2 dotty-574681ebf468642ce55a6aa06c66daee6b8d3742.zip |
Extract common variables to common script in bin dir
Diffstat (limited to 'bin/dotr')
-rwxr-xr-x | bin/dotr | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -7,24 +7,9 @@ if [[ "$DOTTY_ROOT" == "" ]]; then fi DOTTY_ROOT="$(dirname "$DOTTY_ROOT")" DOTTY_ROOT="$( cd "$DOTTY_ROOT" >& /dev/null && pwd )/.." # absolute -SCALA_VERSION=$(grep "scalaVersion in" "$DOTTY_ROOT/project/Build.scala"|sed -n 's/.*\"\(.*\)\".*/\1/'p) -function find_jar { - # Usage: - # find_jar path/to/location file.jar - local artifact="$1/$2" - - if [ ! -f "$artifact" ]; then - artifact=$(find "$HOME/.coursier/cache" -iname "$2") - fi - - echo "$artifact" -} - -# Autodetecting the scala-library location, in case it wasn't provided by an environment variable -if [ "$SCALA_LIBRARY_JAR" == "" ]; then - SCALA_LIBRARY_JAR=$(find_jar "$HOME/.ivy2/cache/org.scala-lang/scala-library/jars" "scala-library-$SCALA_VERSION.jar") -fi +# Load common functions and variables +source $DOTTY_ROOT/bin/common # CLASS_PATH is derived from the DOTTY_ROOT and SCALA_LIBRARY_JAR CLASS_PATH="-Xbootclasspath/a:.:$DOTTY_ROOT/target/scala-2.11/classes/:.:$SCALA_LIBRARY_JAR" |