src/Pure/Admin/other_isabelle.scala
changeset 77094 d44e2d1ca84f
parent 77093 c07d10ac688d
child 77095 4c2aaf60c22c
equal deleted inserted replaced
77093:c07d10ac688d 77094:d44e2d1ca84f
    69 
    69 
    70   def etc: Path = isabelle_home_user + Path.explode("etc")
    70   def etc: Path = isabelle_home_user + Path.explode("etc")
    71   def etc_settings: Path = etc + Path.explode("settings")
    71   def etc_settings: Path = etc + Path.explode("settings")
    72   def etc_preferences: Path = etc + Path.explode("preferences")
    72   def etc_preferences: Path = etc + Path.explode("preferences")
    73 
    73 
    74   def scala_build(fresh: Boolean = false, echo: Boolean = false): Unit = {
       
    75     if (fresh) ssh.rm_tree(isabelle_home + Path.explode("lib/classes"))
       
    76 
       
    77     val dummy_stty = Path.explode("~~/lib/dummy_stty/stty")
       
    78     val dummy_stty_remote = expand_path(dummy_stty)
       
    79     if (!ssh.is_file(dummy_stty_remote)) {
       
    80       ssh.make_directory(dummy_stty_remote.dir)
       
    81       ssh.write_file(dummy_stty_remote, dummy_stty)
       
    82       ssh.set_executable(dummy_stty_remote, true)
       
    83     }
       
    84     try {
       
    85       bash(
       
    86         "export PATH=\"" + bash_path(dummy_stty_remote.dir) + ":$PATH\"\n" +
       
    87         "export CLASSPATH=" + Bash.string(getenv("ISABELLE_CLASSPATH")) + "\n" +
       
    88         "bin/isabelle jedit -b", echo = echo).check
       
    89     }
       
    90     catch { case ERROR(msg) => cat_error("Failed to build Isabelle/Scala/Java modules:", msg) }
       
    91   }
       
    92 
       
    93 
    74 
    94   /* components */
    75   /* components */
    95 
    76 
    96   def init_components(
    77   def init_components(
    97     component_repository: String = Components.default_component_repository,
    78     component_repository: String = Components.default_component_repository,
   112     val missing = Path.split(getenv("ISABELLE_COMPONENTS_MISSING"))
    93     val missing = Path.split(getenv("ISABELLE_COMPONENTS_MISSING"))
   113     for (path <- missing) {
    94     for (path <- missing) {
   114       Components.resolve(path.dir, path.file_name, ssh = ssh,
    95       Components.resolve(path.dir, path.file_name, ssh = ssh,
   115         progress = if (echo) progress else new Progress)
    96         progress = if (echo) progress else new Progress)
   116     }
    97     }
       
    98   }
       
    99 
       
   100   def scala_build(fresh: Boolean = false, echo: Boolean = false): Unit = {
       
   101     if (fresh) ssh.rm_tree(isabelle_home + Path.explode("lib/classes"))
       
   102 
       
   103     val dummy_stty = Path.explode("~~/lib/dummy_stty/stty")
       
   104     val dummy_stty_remote = expand_path(dummy_stty)
       
   105     if (!ssh.is_file(dummy_stty_remote)) {
       
   106       ssh.make_directory(dummy_stty_remote.dir)
       
   107       ssh.write_file(dummy_stty_remote, dummy_stty)
       
   108       ssh.set_executable(dummy_stty_remote, true)
       
   109     }
       
   110     try {
       
   111       bash(
       
   112         "export PATH=\"" + bash_path(dummy_stty_remote.dir) + ":$PATH\"\n" +
       
   113         "export CLASSPATH=" + Bash.string(getenv("ISABELLE_CLASSPATH")) + "\n" +
       
   114         "bin/isabelle jedit -b", echo = echo).check
       
   115     }
       
   116     catch { case ERROR(msg) => cat_error("Failed to build Isabelle/Scala/Java modules:", msg) }
   117   }
   117   }
   118 
   118 
   119 
   119 
   120   /* settings */
   120   /* settings */
   121 
   121