lib/Tools/scala
author wenzelm
Wed, 31 Mar 2021 11:24:46 +0200
changeset 73772 d3f2038198ae
parent 72108 f92c7e2ba8da
child 74252 678e1c9eb009
permissions -rwxr-xr-x
clarified (again): local tip could be actually more recent;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27914
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     2
#
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     3
# Author: Makarius
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     4
#
27916
09b3010ffaf2 removed unused usage;
wenzelm
parents: 27914
diff changeset
     5
# DESCRIPTION: invoke Scala within the Isabelle environment
27914
9a7f17370ffb refined scala/java wrappers via isatool;
wenzelm
parents:
diff changeset
     6
52443
725916b7dee5 more formal isabelle_admin_build;
wenzelm
parents: 48915
diff changeset
     7
isabelle_admin_build jars || exit $?
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents: 29143
diff changeset
     8
66906
03a96b8c7c06 updated to jdk-8u152, which is for x86_64 only;
wenzelm
parents: 61294
diff changeset
     9
eval "declare -a JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS)"
59894
ca16b657901f ISABELLE_JAVA_SYSTEM_OPTIONS for scala REPL;
wenzelm
parents: 53576
diff changeset
    10
declare -a SCALA_ARGS=()
ca16b657901f ISABELLE_JAVA_SYSTEM_OPTIONS for scala REPL;
wenzelm
parents: 53576
diff changeset
    11
for ARG in "${JAVA_ARGS[@]}"
ca16b657901f ISABELLE_JAVA_SYSTEM_OPTIONS for scala REPL;
wenzelm
parents: 53576
diff changeset
    12
do
ca16b657901f ISABELLE_JAVA_SYSTEM_OPTIONS for scala REPL;
wenzelm
parents: 53576
diff changeset
    13
  SCALA_ARGS["${#SCALA_ARGS[@]}"]="-J$ARG"
ca16b657901f ISABELLE_JAVA_SYSTEM_OPTIONS for scala REPL;
wenzelm
parents: 53576
diff changeset
    14
done
ca16b657901f ISABELLE_JAVA_SYSTEM_OPTIONS for scala REPL;
wenzelm
parents: 53576
diff changeset
    15
72108
f92c7e2ba8da more accurate classpath for "isabelle scala";
wenzelm
parents: 69126
diff changeset
    16
[ -n "$CLASSPATH" ] && classpath "$CLASSPATH"
f92c7e2ba8da more accurate classpath for "isabelle scala";
wenzelm
parents: 69126
diff changeset
    17
unset CLASSPATH
f92c7e2ba8da more accurate classpath for "isabelle scala";
wenzelm
parents: 69126
diff changeset
    18
59894
ca16b657901f ISABELLE_JAVA_SYSTEM_OPTIONS for scala REPL;
wenzelm
parents: 53576
diff changeset
    19
isabelle_scala scala "${SCALA_ARGS[@]}" \
72108
f92c7e2ba8da more accurate classpath for "isabelle scala";
wenzelm
parents: 69126
diff changeset
    20
  -classpath "$(platform_path "$ISABELLE_CLASSPATH")" \
f92c7e2ba8da more accurate classpath for "isabelle scala";
wenzelm
parents: 69126
diff changeset
    21
  -Disabelle.scala.classpath="$(platform_path "$ISABELLE_CLASSPATH")" "$@"