clarified signature;
authorwenzelm
Fri, 07 May 2021 23:56:18 +0200
changeset 73906 9ce115baaa4f
parent 73905 029de1598940
child 73907 4fbbf421c376
clarified signature;
src/Pure/Admin/build_spass.scala
src/Pure/Admin/build_vampire.scala
src/Pure/System/isabelle_system.scala
--- a/src/Pure/Admin/build_spass.scala	Fri May 07 21:03:20 2021 +0200
+++ b/src/Pure/Admin/build_spass.scala	Fri May 07 23:56:18 2021 +0200
@@ -22,7 +22,8 @@
   {
     Isabelle_System.with_tmp_dir("build")(tmp_dir =>
     {
-      Isabelle_System.require_command("bison", "flex")
+      Isabelle_System.require_command("bison")
+      Isabelle_System.require_command("flex")
 
 
       /* component */
--- a/src/Pure/Admin/build_vampire.scala	Fri May 07 21:03:20 2021 +0200
+++ b/src/Pure/Admin/build_vampire.scala	Fri May 07 23:56:18 2021 +0200
@@ -29,7 +29,8 @@
     progress: Progress = new Progress,
     target_dir: Path = Path.current): Unit =
   {
-    Isabelle_System.require_command("git", "cmake")
+    Isabelle_System.require_command("git")
+    Isabelle_System.require_command("cmake")
 
     Isabelle_System.with_tmp_dir("build")(tmp_dir =>
     {
--- a/src/Pure/System/isabelle_system.scala	Fri May 07 21:03:20 2021 +0200
+++ b/src/Pure/System/isabelle_system.scala	Fri May 07 23:56:18 2021 +0200
@@ -543,11 +543,9 @@
     else error("Expected to find GNU tar executable")
   }
 
-  def require_command(cmds: String*): Unit =
+  def require_command(cmd: String, test: String = "--version"): Unit =
   {
-    for (cmd <- cmds) {
-      if (!bash(Bash.string(cmd) + " --version").ok) error("Missing system command: " + quote(cmd))
-    }
+    if (!bash(Bash.string(cmd) + " " + test).ok) error("Missing system command: " + quote(cmd))
   }
 
   def hostname(): String = bash("hostname -s").check.out