Commit a396e973 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixed submitting

parent 7413fda3
......@@ -47,6 +47,11 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
private def changeScript(file: File): Unit = {
val lines = Source.fromFile(file).getLines().toList
val writer = new PrintWriter(file)
remoteCommand match {
case "bash" => writer.println("#!/bin/bash")
case "sh" => writer.println("#!/bin/sh")
case _ => writer.println(s"#!$remoteCommand")
}
writer.println("set -eubf")
writer.println("set -o pipefail")
lines.foreach(writer.println)
......@@ -66,8 +71,9 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
changeScript(new File(jt.getArgs.head.toString))
jt.setRemoteCommand(remoteCommand)
case ps: ProcessSettings =>
changeScript(new File(ps.getCommand.tail.head))
ps.setCommand(Array(remoteCommand) ++ ps.getCommand.tail)
changeScript(new File(ps.getCommand.last))
if (ps.getCommand.head != "srun")
ps.setCommand(Array(remoteCommand) ++ ps.getCommand.tail)
}
/**
......
Subproject commit 35db9b9166fba2bc0d889607ecf12f9e15b40cf2
Subproject commit 0c34163e39441895f83ab7690164407dc1a6181a
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment