379 |
379 |
380 def bash(script: String, |
380 def bash(script: String, |
381 cwd: JFile = null, |
381 cwd: JFile = null, |
382 env: JMap[String, String] = settings(), |
382 env: JMap[String, String] = settings(), |
383 redirect: Boolean = false, |
383 redirect: Boolean = false, |
|
384 input: String = "", |
384 progress_stdout: String => Unit = (_: String) => (), |
385 progress_stdout: String => Unit = (_: String) => (), |
385 progress_stderr: String => Unit = (_: String) => (), |
386 progress_stderr: String => Unit = (_: String) => (), |
386 watchdog: Option[Bash.Watchdog] = None, |
387 watchdog: Option[Bash.Watchdog] = None, |
387 strict: Boolean = true, |
388 strict: Boolean = true, |
388 cleanup: () => Unit = () => ()): Process_Result = |
389 cleanup: () => Unit = () => ()): Process_Result = |
389 { |
390 { |
390 Bash.process(script, cwd = cwd, env = env, redirect = redirect, cleanup = cleanup). |
391 Bash.process(script, cwd = cwd, env = env, redirect = redirect, cleanup = cleanup). |
391 result(progress_stdout = progress_stdout, progress_stderr = progress_stderr, |
392 result(input = input, progress_stdout = progress_stdout, progress_stderr = progress_stderr, |
392 watchdog = watchdog, strict = strict) |
393 watchdog = watchdog, strict = strict) |
393 } |
394 } |
394 |
395 |
395 private lazy val gnutar_check: Boolean = |
396 private lazy val gnutar_check: Boolean = |
396 try { bash("tar --version").check.out.containsSlice("GNU tar") || error("") } |
397 try { bash("tar --version").check.out.containsSlice("GNU tar") || error("") } |