blob: ce68aa960882d264971a2be1bf12361119200905 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package cbt
trait CommandLineOverrides extends DynamicOverrides{
def `with`: Any = {
lib.callReflective(
newBuild[DynamicOverrides](
context.copy(
args = context.args.drop(2)
)
)( s"""
${context.args.lift(0).getOrElse("")}
""" ),
context.args.lift(1) orElse Some("void")
)
}
def eval = {
lib.callReflective(
newBuild[CommandLineOverrides](
context.copy(
args = ( context.args.lift(0).map("println{ "+_+" }") ).toSeq
)
){""},
Some("with")
)
}
}
|