You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2007/02/23 05:27:35 UTC
svn commit: r510808 - in
/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util:
BastardChildReaper.groovy ShellExecutor.groovy
Author: jdillon
Date: Thu Feb 22 20:27:34 2007
New Revision: 510808
URL: http://svn.apache.org/viewvc?view=rev&rev=510808
Log:
Add helper for single-string script
Modified:
geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/BastardChildReaper.groovy
geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/ShellExecutor.groovy
Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/BastardChildReaper.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/BastardChildReaper.groovy?view=diff&rev=510808&r1=510807&r2=510808
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/BastardChildReaper.groovy (original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/BastardChildReaper.groovy Thu Feb 22 20:27:34 2007
@@ -37,8 +37,7 @@
private String sh(String script, List args) {
assert script
- def shell = new ShellExecutor()
- shell << script
+ def shell = new ShellExecutor(script)
return shell.execite(args)
}
Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/ShellExecutor.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/ShellExecutor.groovy?view=diff&rev=510808&r1=510807&r2=510808
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/ShellExecutor.groovy (original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/ShellExecutor.groovy Thu Feb 22 20:27:34 2007
@@ -36,8 +36,15 @@
boolean failOnError = false
- def ShellExecutor() {
+ def ShellExecutor(String script) {
body << '#!/bin/sh'
+ if (script) {
+ body << script
+ }
+ }
+
+ def ShellExecutor() {
+ this(null)
}
def leftShift(String text) {