426 verbose: Boolean = false, |
426 verbose: Boolean = false, |
427 dry_run: Boolean = false, |
427 dry_run: Boolean = false, |
428 clean: Boolean = false, |
428 clean: Boolean = false, |
429 filter: List[String] = Nil, |
429 filter: List[String] = Nil, |
430 args: List[String] = Nil |
430 args: List[String] = Nil |
431 ): Process_Result = { |
431 ): Unit = { |
432 val script = |
432 val script = |
433 "rsync --protect-args --archive" + |
433 "rsync --protect-args --archive" + |
434 (if (verbose || dry_run) " --verbose" else "") + |
434 (if (verbose || dry_run) " --verbose" else "") + |
435 (if (dry_run) " --dry-run" else "") + |
435 (if (dry_run) " --dry-run" else "") + |
436 (if (clean) " --delete-excluded" else "") + |
436 (if (clean) " --delete-excluded" else "") + |
437 filter.map(s => " --filter=" + Bash.string(s)).mkString + |
437 filter.map(s => " --filter=" + Bash.string(s)).mkString + |
438 (if (args.nonEmpty) " " + Bash.strings(args) else "") |
438 (if (args.nonEmpty) " " + Bash.strings(args) else "") |
439 progress.bash(script, cwd = cwd, echo = true) |
439 progress.bash(script, cwd = cwd, echo = true).check |
440 } |
440 } |
441 |
441 |
442 def make_patch(base_dir: Path, src: Path, dst: Path, diff_options: String = ""): String = { |
442 def make_patch(base_dir: Path, src: Path, dst: Path, diff_options: String = ""): String = { |
443 with_tmp_file("patch") { patch => |
443 with_tmp_file("patch") { patch => |
444 Isabelle_System.bash( |
444 Isabelle_System.bash( |