aboutsummaryrefslogtreecommitdiff
path: root/stage1
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-06-15 22:38:53 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2017-06-15 22:43:59 -0400
commit09051773461b98d374d1b46dd0a2caa57768ab30 (patch)
treed67c88d10906647c7fd56229e6e56121a9107744 /stage1
parentb5194aab6f1f57aff6e4538acaf91245fdf15039 (diff)
downloadcbt-09051773461b98d374d1b46dd0a2caa57768ab30.tar.gz
cbt-09051773461b98d374d1b46dd0a2caa57768ab30.tar.bz2
cbt-09051773461b98d374d1b46dd0a2caa57768ab30.zip
add sbt-resolver like restart feature
Diffstat (limited to 'stage1')
-rw-r--r--stage1/Stage1Lib.scala15
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