prefer Other_Isabelle.init instead of adhoc scripts;
authorwenzelm
Wed, 25 Jan 2023 21:10:20 +0100
changeset 77099 378bb7a739c3
parent 77098 9d6118cdc0fd
child 77100 9f44559c00a9
prefer Other_Isabelle.init instead of adhoc scripts;
src/Pure/Admin/build_history.scala
--- a/src/Pure/Admin/build_history.scala	Wed Jan 25 20:52:36 2023 +0100
+++ b/src/Pure/Admin/build_history.scala	Wed Jan 25 21:10:20 2023 +0100
@@ -551,9 +551,12 @@
         strict = strict).check
 
     sync(isabelle_self)
-    execute("bin/isabelle", "components -I")
-    execute("bin/isabelle", "components -a", echo = true)
-    execute("bin/isabelle", "jedit -bf")
+
+    val self_isabelle =
+      Other_Isabelle(isabelle_self, isabelle_identifier = isabelle_identifier,
+        ssh = ssh, progress = progress)
+
+    self_isabelle.init(fresh = true, echo = true)
 
     sync(isabelle_other, accurate = true,
       rev = proper_string(rev) getOrElse "tip",
@@ -569,10 +572,15 @@
         val output_file = tmp_dir + Path.explode("output")
         val build_options = (if (afp_repos.isEmpty) "" else " -A") + " " + options
         try {
-          execute("Admin/build_other",
-            "-o " + ssh.bash_path(output_file) + build_options + " " +
-              ssh.bash_path(isabelle_other) + " " + args,
-            echo = true, strict = false)
+          val script =
+            Isabelle_System.export_isabelle_identifier(isabelle_identifier) +
+              ssh.bash_path(self_isabelle.isabelle_home + Path.explode("Admin/build_other")) +
+              " -o " + ssh.bash_path(output_file) + build_options + " " +
+              ssh.bash_path(isabelle_other) + " " + args
+          ssh.execute(script,
+            progress_stdout = progress.echo,
+            progress_stderr = progress.echo,
+            strict = false).check
         }
         catch {
           case ERROR(msg) =>