src/Pure/General/ssh.scala
changeset 80212 67b5e8b88728
parent 80211 2ec1b11f1f93
child 80214 d78446e2b613
equal deleted inserted replaced
80211:2ec1b11f1f93 80212:67b5e8b88728
   163     def run_sftp(
   163     def run_sftp(
   164       script: String,
   164       script: String,
   165       init: Path => Unit = _ => (),
   165       init: Path => Unit = _ => (),
   166       exit: Path => Unit = _ => ()
   166       exit: Path => Unit = _ => ()
   167     ): Process_Result = {
   167     ): Process_Result = {
   168       Isabelle_System.with_tmp_dir("ssh") { dir =>
   168       Isabelle_System.with_tmp_dir("sftp") { dir =>
   169         init(dir)
   169         init(dir)
   170         File.write(dir + Path.explode("script"), script)
   170         File.write(dir + Path.explode("script"), script)
   171         val result =
   171         val result =
   172           run_command("sftp", opts = "-b script", args = Bash.string(host), cwd = dir.file).check
   172           run_command("sftp", opts = "-b script", args = Bash.string(host), cwd = dir.file).check
   173         exit(dir)
   173         exit(dir)