aboutsummaryrefslogtreecommitdiff
path: root/stage2/Lib.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-11-13 14:45:36 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2016-11-13 15:29:33 -0500
commitff6856395499853f3dc10723a0c722ee4c33fed7 (patch)
tree3b0e339e941f51dfcf7c0d159522dd22be73f884 /stage2/Lib.scala
parent9664f3e22156ab159e310f31720082b417dcf03e (diff)
downloadcbt-ff6856395499853f3dc10723a0c722ee4c33fed7.tar.gz
cbt-ff6856395499853f3dc10723a0c722ee4c33fed7.tar.bz2
cbt-ff6856395499853f3dc10723a0c722ee4c33fed7.zip
minor refactoring using shorter names
Diffstat (limited to 'stage2/Lib.scala')
-rw-r--r--stage2/Lib.scala13
1 files changed, 8 insertions, 5 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala
index 9da468d..c007906 100644
--- a/stage2/Lib.scala
+++ b/stage2/Lib.scala
@@ -31,13 +31,16 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{
This can either the Build itself, of if exists a BuildBuild or a BuildBuild for a BuildBuild and so on.
*/
def loadRoot(context: Context, default: Context => BuildInterface = new BasicBuild(_)): BuildInterface = {
- context.logger.composition( context.logger.showInvocation("Build.loadRoot",context.projectDirectory) )
def findStartDir(projectDirectory: File): File = {
val buildDir = realpath( projectDirectory ++ "/build" )
if(buildDir.exists) findStartDir(buildDir) else projectDirectory
}
- val start = findStartDir(context.projectDirectory)
+ val directory = context.projectDirectory
+
+ context.logger.composition( context.logger.showInvocation("Build.loadRoot",directory) )
+
+ val start = findStartDir(directory)
val useBasicBuildBuild = context.projectDirectory == start
@@ -49,9 +52,9 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{
// essentials depends on eval, which has a build that depends on scalatest
// this means in these we can't depend on essentials
// hopefully we find a better way that this pretty hacky exclusion rule
- context.projectDirectory == (context.cbtHome ++ "/plugins/essentials")
- || context.projectDirectory == (context.cbtHome ++ "/libraries/eval")
- || context.projectDirectory == (context.cbtHome ++ "/plugins/scalatest")
+ directory == (context.cbtHome ++ "/plugins/essentials")
+ || directory == (context.cbtHome ++ "/libraries/eval")
+ || directory == (context.cbtHome ++ "/plugins/scalatest")
)
new cbt.BasicBuild( context.copy( projectDirectory = start ) ) with BuildBuildWithoutEssentials
else