more robust classpath: skip empty entries;
authorwenzelm
Thu, 15 Jul 2021 18:18:07 +0200
changeset 74253 842fc354c031
parent 74252 678e1c9eb009
child 74254 778ab9983f40
more robust classpath: skip empty entries;
bin/isabelle_java
lib/Tools/java
lib/Tools/scala
lib/Tools/scalac
lib/scripts/getfunctions
--- a/bin/isabelle_java	Thu Jul 15 17:33:06 2021 +0200
+++ b/bin/isabelle_java	Thu Jul 15 18:18:07 2021 +0200
@@ -19,8 +19,7 @@
   eval "declare -a JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS $ISABELLE_TOOL_JAVA_OPTIONS)"
 
   classpath "$ISABELLE_SETUP_CLASSPATH"
-
-  [ -n "$CLASSPATH" ] && classpath "$CLASSPATH"
+  classpath "$CLASSPATH"
 
   echo "$ISABELLE_ROOT"
   echo "$CYGWIN_ROOT"
--- a/lib/Tools/java	Thu Jul 15 17:33:06 2021 +0200
+++ b/lib/Tools/java	Thu Jul 15 18:18:07 2021 +0200
@@ -6,11 +6,8 @@
 
 eval "declare -a JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS)"
 
-classpath "$ISABELLE_SETUP_CLASSPATH"
-unset ISABELLE_SETUP_CLASSPATH
-
-[ -n "$CLASSPATH" ] && classpath "$CLASSPATH"
-unset CLASSPATH
+classpath "$ISABELLE_SETUP_CLASSPATH"; unset ISABELLE_SETUP_CLASSPATH
+classpath "$CLASSPATH"; unset CLASSPATH
 
 isabelle_java java "${JAVA_ARGS[@]}" \
   -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "$@"
--- a/lib/Tools/scala	Thu Jul 15 17:33:06 2021 +0200
+++ b/lib/Tools/scala	Thu Jul 15 18:18:07 2021 +0200
@@ -13,11 +13,8 @@
   SCALA_ARGS["${#SCALA_ARGS[@]}"]="-J$ARG"
 done
 
-classpath "$ISABELLE_SETUP_CLASSPATH"
-unset ISABELLE_SETUP_CLASSPATH
-
-[ -n "$CLASSPATH" ] && classpath "$CLASSPATH"
-unset CLASSPATH
+classpath "$ISABELLE_SETUP_CLASSPATH"; unset ISABELLE_SETUP_CLASSPATH
+classpath "$CLASSPATH"; unset CLASSPATH
 
 isabelle_scala scala "${SCALA_ARGS[@]}" \
   -classpath "$(platform_path "$ISABELLE_CLASSPATH")" \
--- a/lib/Tools/scalac	Thu Jul 15 17:33:06 2021 +0200
+++ b/lib/Tools/scalac	Thu Jul 15 18:18:07 2021 +0200
@@ -6,11 +6,8 @@
 
 isabelle_admin_build jars || exit $?
 
-classpath "$ISABELLE_SETUP_CLASSPATH"
-unset ISABELLE_SETUP_CLASSPATH
-
-[ -n "$CLASSPATH" ] && classpath "$CLASSPATH"
-unset CLASSPATH
+classpath "$ISABELLE_SETUP_CLASSPATH"; unset ISABELLE_SETUP_CLASSPATH
+classpath "$CLASSPATH"; unset CLASSPATH
 
 isabelle_scala scalac -Dfile.encoding=UTF-8 \
   -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "$@"
--- a/lib/scripts/getfunctions	Thu Jul 15 17:33:06 2021 +0200
+++ b/lib/scripts/getfunctions	Thu Jul 15 18:18:07 2021 +0200
@@ -106,7 +106,7 @@
   do
     if [ -z "$ISABELLE_CLASSPATH" ]; then
       ISABELLE_CLASSPATH="$X"
-    else
+    elif [ -n "$X" ]; then
       ISABELLE_CLASSPATH="$ISABELLE_CLASSPATH:$X"
     fi
   done