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/03/09 02:02:43 UTC

svn commit: r516244 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/ShellExecutor.groovy

Author: jdillon
Date: Thu Mar  8 17:02:42 2007
New Revision: 516244

URL: http://svn.apache.org/viewvc?view=rev&rev=516244
Log:
Split up the script into multi-line for better output handling

Modified:
    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/ShellExecutor.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/ShellExecutor.groovy?view=diff&rev=516244&r1=516243&r2=516244
==============================================================================
--- 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 Mar  8 17:02:42 2007
@@ -38,12 +38,7 @@
     
     def ShellExecutor(String script) {
         body << '#!/bin/sh'
-        if (script) {
-            // Split up the script into multi-line for better output handling
-            new StringReader(script).eachLine { line ->
-                body << line
-            }
-        }
+        this << script
     }
     
     def ShellExecutor() {
@@ -53,7 +48,10 @@
     def leftShift(String text) {
         assert text
         
-        body << text
+        // Split up the script into multi-line for better output handling
+        new StringReader(text).eachLine { line ->
+            body << line
+        }
     }
     
     def execute(List args) {