equal
deleted
inserted
replaced
496 /* Isabelle self repository */ |
496 /* Isabelle self repository */ |
497 |
497 |
498 val isabelle_hg = |
498 val isabelle_hg = |
499 Mercurial.setup_repository(isabelle_repos_source, isabelle_repos_self, ssh = ssh) |
499 Mercurial.setup_repository(isabelle_repos_source, isabelle_repos_self, ssh = ssh) |
500 |
500 |
|
501 def execute(cmd: String, args: String, echo: Boolean = false, strict: Boolean = true): Unit = |
|
502 ssh.execute( |
|
503 Isabelle_System.export_isabelle_identifier(isabelle_identifier) + |
|
504 ssh.bash_path(isabelle_repos_self + Path.explode(cmd)) + " " + args, |
|
505 progress_stdout = progress.echo_if(echo, _), |
|
506 progress_stderr = progress.echo_if(echo, _), |
|
507 strict = strict).check |
|
508 |
501 if (self_update) { |
509 if (self_update) { |
502 val self_rev = |
510 val self_rev = |
503 if (push_isabelle_home) { |
511 if (push_isabelle_home) { |
504 val isabelle_home_hg = Mercurial.repository(Path.explode("~~")) |
512 val isabelle_home_hg = Mercurial.repository(Path.explode("~~")) |
505 val self_rev = isabelle_home_hg.id() |
513 val self_rev = isabelle_home_hg.id() |
509 else { |
517 else { |
510 isabelle_hg.pull() |
518 isabelle_hg.pull() |
511 isabelle_hg.id() |
519 isabelle_hg.id() |
512 } |
520 } |
513 isabelle_hg.update(rev = self_rev, clean = true) |
521 isabelle_hg.update(rev = self_rev, clean = true) |
514 for (cmd <- List("components -I", "components -a")) { |
522 execute("bin/isabelle", "components -I") |
515 ssh.execute( |
523 execute("bin/isabelle", "components -a") |
516 ssh.bash_path(isabelle_repos_self + Path.explode("bin/isabelle")) + " " + cmd).check |
524 execute("Admin/build", "jars_fresh") |
517 } |
|
518 ssh.execute( |
|
519 ssh.bash_path(isabelle_repos_self + Path.explode("Admin/build")) + " jars_fresh").check |
|
520 } |
525 } |
521 |
526 |
522 |
527 |
523 /* Isabelle other + AFP repository */ |
528 /* Isabelle other + AFP repository */ |
524 |
529 |
542 |
547 |
543 ssh.with_tmp_dir(tmp_dir => |
548 ssh.with_tmp_dir(tmp_dir => |
544 { |
549 { |
545 val output_file = tmp_dir + Path.explode("output") |
550 val output_file = tmp_dir + Path.explode("output") |
546 |
551 |
547 ssh.execute( |
552 execute("Admin/build_history", |
548 Isabelle_System.export_isabelle_identifier(isabelle_identifier) + |
553 "-o " + ssh.bash_path(output_file) + |
549 ssh.bash_path(isabelle_repos_self + Path.explode("Admin/build_history")) + |
|
550 " -o " + ssh.bash_path(output_file) + |
|
551 (if (rev == "") "" else " -r " + Bash.string(rev)) + " " + |
554 (if (rev == "") "" else " -r " + Bash.string(rev)) + " " + |
552 options + afp_options + " " + ssh.bash_path(isabelle_repos_other) + " " + args, |
555 options + afp_options + " " + ssh.bash_path(isabelle_repos_other) + " " + args, |
553 progress_stdout = progress.echo(_), |
556 echo = true, strict = false) |
554 progress_stderr = progress.echo(_), |
|
555 strict = false).check |
|
556 |
557 |
557 for (line <- split_lines(ssh.read(output_file))) |
558 for (line <- split_lines(ssh.read(output_file))) |
558 yield { |
559 yield { |
559 val log = Path.explode(line) |
560 val log = Path.explode(line) |
560 val bytes = ssh.read_bytes(log) |
561 val bytes = ssh.read_bytes(log) |