Mercurial > public > develkit
comparison scripts/antall.groovy @ 93:f351338a3b3a
adding useful scripts
author | smith@nwoca.org |
---|---|
date | Wed, 22 Feb 2012 19:14:04 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
92:90325a10fe95 | 93:f351338a3b3a |
---|---|
1 | |
2 def targets = 'clean default' | |
3 if (args) { | |
4 targets = args.join(' ') | |
5 } | |
6 | |
7 new File('.').traverse([type: groovy.io.FileType.DIRECTORIES, maxDepth:2]) { project -> | |
8 def script = new File(project,'build.xml') | |
9 if (script.exists() ) { | |
10 | |
11 def out = new StringBuffer() | |
12 def err = new StringBuffer() | |
13 println "-" * 50 | |
14 println "processing: $script ($targets)" | |
15 def proc = "cmd /C ant $targets".execute(null,project) | |
16 proc.consumeProcessOutput(out,out) | |
17 proc.waitForOrKill(480 * 1000) | |
18 new File(project,"build.log").text = out.toString() | |
19 println out | |
20 } | |
21 } |