--- a/src/Pure/Admin/build_history.scala Tue Jan 24 15:00:01 2023 +0100
+++ b/src/Pure/Admin/build_history.scala Tue Jan 24 15:16:24 2023 +0100
@@ -207,13 +207,7 @@
if (first_build) {
other_isabelle.resolve_components(echo = verbose)
-
- if (fresh) {
- Isabelle_System.rm_tree(other_isabelle.isabelle_home + Path.explode("lib/classes"))
- }
- other_isabelle.bash(
- "env PATH=\"" + File.bash_path(Path.explode("~~/lib/dummy_stty")) + ":$PATH\" " +
- "bin/isabelle jedit -b", redirect = true, echo = verbose).check
+ other_isabelle.scala_build(fresh = fresh, echo = verbose)
for {
tool <- List("ghc_setup", "ocaml_setup")
--- a/src/Pure/Admin/build_release.scala Tue Jan 24 15:00:01 2023 +0100
+++ b/src/Pure/Admin/build_release.scala Tue Jan 24 15:16:24 2023 +0100
@@ -470,12 +470,7 @@
other_isabelle.init_components(components_base = context.components_base))
other_isabelle.resolve_components(echo = true)
- try {
- other_isabelle.bash(
- "export CLASSPATH=" + Bash.string(other_isabelle.getenv("ISABELLE_CLASSPATH")) + "\n" +
- "bin/isabelle jedit -b", echo = true).check
- }
- catch { case ERROR(msg) => cat_error("Failed to build Isabelle/Scala/Java modules:", msg) }
+ other_isabelle.scala_build(echo = true)
try {
other_isabelle.bash(
--- a/src/Pure/Admin/other_isabelle.scala Tue Jan 24 15:00:01 2023 +0100
+++ b/src/Pure/Admin/other_isabelle.scala Tue Jan 24 15:16:24 2023 +0100
@@ -62,6 +62,19 @@
}
}
+ def scala_build(fresh: Boolean = false, echo: Boolean = false): Unit = {
+ if (fresh) {
+ Isabelle_System.rm_tree(isabelle_home + Path.explode("lib/classes"))
+ }
+ try {
+ bash(
+ "export PATH=\"" + File.bash_path(Path.explode("~~/lib/dummy_stty")) + ":$PATH\"\n" +
+ "export CLASSPATH=" + Bash.string(getenv("ISABELLE_CLASSPATH")) + "\n" +
+ "bin/isabelle jedit -b", echo = echo).check
+ }
+ catch { case ERROR(msg) => cat_error("Failed to build Isabelle/Scala/Java modules:", msg) }
+ }
+
/* components */