Skip to content
Snippets Groups Projects
Commit 3f393b6d authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Better subprocess

parent bd8a2a63
No related branches found
No related tags found
No related merge requests found
......@@ -11,12 +11,15 @@ class Ln(val globalConfig: Config) extends InProcessFunction {
this.analysisName = "ln"
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
@Input(doc="Input file") var in: File = _
@Output(doc="Link destination") var out: File = _
@Input(doc="Input file")
var in: File = _
@Output(doc="Link destination")
var out: File = _
override def run {
val cmd = "ln -s " + in + " " + out
val exitcode = cmd.!
System.out.println("cmd: '" + cmd + "', exitcode: " + exitcode)
val process = Process(cmd).run
System.out.println("cmd: '" + cmd + "', exitcode: " + process.exitValue)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment