diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-02-06 13:03:36 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-04 15:06:30 -0500 |
commit | 974942db43ff2d1fa7ba71ad60f9bb9eae2d8631 (patch) | |
tree | d7235df9d4d6a67753dc2a20ab6bfcb7a24dc74c /bootstrap_scala/bootstrap_scala | |
download | cbt-974942db43ff2d1fa7ba71ad60f9bb9eae2d8631.tar.gz cbt-974942db43ff2d1fa7ba71ad60f9bb9eae2d8631.tar.bz2 cbt-974942db43ff2d1fa7ba71ad60f9bb9eae2d8631.zip |
CBT Version 1.0-BETA
Diffstat (limited to 'bootstrap_scala/bootstrap_scala')
-rwxr-xr-x | bootstrap_scala/bootstrap_scala | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bootstrap_scala/bootstrap_scala b/bootstrap_scala/bootstrap_scala new file mode 100755 index 0000000..051f429 --- /dev/null +++ b/bootstrap_scala/bootstrap_scala @@ -0,0 +1,27 @@ +#!/bin/sh + +_DIR=$(dirname $(readlink "$0") 2>/dev/null || dirname "$0" 2>/dev/null ) +DIR=$(dirname $($_DIR/../realpath/realpath.sh $0)) +JAVAC="javac -Xlint:deprecation" +TARGET=$DIR/target +CLASSES=$TARGET/classes/ +VERSION=$1 +CACHE=$DIR/cache/$VERSION/ + +COMPILER_JAR=scala-compiler-$VERSION.jar +LIBRARY_JAR=scala-library-$VERSION.jar +REFLECT_JAR=scala-reflect-$VERSION.jar +XML_JAR=scala-xml_2.11-1.0.5.jar # this is a bit fishy, because it doesn't take version into account + +mkdir -p $CLASSES + +if [ ! -f $CACHE$COMPILER_JAR ] || [ ! -f $CACHE$LIBRARY_JAR ] || [ ! -f $CACHE$REFLECT_JAR ]\ + || [ ! -f $CACHE$XML_JAR ] || [ $DIR/BootstrapScala.java -nt $CLASSES/BootstrapScala.class ] +then + echo "Recompiling CBT BootstrapScala.java" 1>&2 + $JAVAC -d $CLASSES $DIR/BootstrapScala.java + java -cp $CLASSES BootstrapScala $1 $CACHE +else + # for speedup + echo `for f in $CACHE*; do printf "$f "; done`|tr " " ":" +fi |