diff options
Diffstat (limited to 'stage1/Stage1Lib.scala')
-rw-r--r-- | stage1/Stage1Lib.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala index ab95a41..89e52b6 100644 --- a/stage1/Stage1Lib.scala +++ b/stage1/Stage1Lib.scala @@ -417,6 +417,21 @@ ${sourceFiles.sorted.mkString(" \\\n")} StandardOpenOption.APPEND ) } + + /** + add process id to a cbt internal list of processes to kill + when looping after a file change + */ + def addProcessIdToKillList(cwd: File, processId: Int) = { + val file = cwd / "target/.cbt-kill.tmp" + file.createNewFile + lib.write( + file, + processId.toString + "\n", + StandardOpenOption.APPEND + ) + } + def cached[T]( targetDirectory: File, inputLastModified: Long )( action: () => T ): (Option[T],Long) = { val t = targetDirectory val start = System.currentTimeMillis |