diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2011-03-30 22:33:08 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2011-03-30 22:33:08 +0000 |
| commit | cfc2ab9cff9f7ef281293efeeb8cdbe1e03ac499 (patch) | |
| tree | d398a02f1b1fd88b829b241b79aa2e9a972b8b80 | |
| parent | 9c9bc76198b433438247572e44594b93669a5f85 (diff) | |
| download | build-cfc2ab9cff9f7ef281293efeeb8cdbe1e03ac499.tar.gz build-cfc2ab9cff9f7ef281293efeeb8cdbe1e03ac499.tar.bz2 build-cfc2ab9cff9f7ef281293efeeb8cdbe1e03ac499.tar.xz build-cfc2ab9cff9f7ef281293efeeb8cdbe1e03ac499.zip | |
Build was still using the old trimBack function, which no longer exists. I went
and added a trimWhitespace function to Bu::String, very nice.
Diffstat (limited to '')
| -rw-r--r-- | src/context.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/context.cpp b/src/context.cpp index dc2e6a1..ce1dfee 100644 --- a/src/context.cpp +++ b/src/context.cpp | |||
| @@ -219,7 +219,9 @@ Bu::String Context::expand( const Bu::String &sInS ) | |||
| 219 | try | 219 | try |
| 220 | { | 220 | { |
| 221 | //sio << "Executing command: >>>" << sCmd << "<<<" << sio.nl; | 221 | //sio << "Executing command: >>>" << sCmd << "<<<" << sio.nl; |
| 222 | Process p( Process::StdOut, "/bin/bash", "/bin/bash", "-c", sCmd.getStr(), NULL ); | 222 | Process p( Process::StdOut, |
| 223 | "/bin/bash", "/bin/bash", "-c", sCmd.getStr(), NULL | ||
| 224 | ); | ||
| 223 | char buf[4096]; | 225 | char buf[4096]; |
| 224 | do | 226 | do |
| 225 | { | 227 | { |
| @@ -227,8 +229,8 @@ Bu::String Context::expand( const Bu::String &sInS ) | |||
| 227 | } | 229 | } |
| 228 | while( p.isRunning() ); | 230 | while( p.isRunning() ); |
| 229 | sBuf.append( buf, p.read( buf, 4096 ) ); | 231 | sBuf.append( buf, p.read( buf, 4096 ) ); |
| 230 | sBuf = sBuf.replace("\n", " ").replace("\r", " "); | 232 | sBuf = sBuf.replace("\n", " ").replace("\r", " "). |
| 231 | sBuf.trimBack(' '); | 233 | trimWhitespace(); |
| 232 | sRet.append( sBuf ); | 234 | sRet.append( sBuf ); |
| 233 | } catch(...) | 235 | } catch(...) |
| 234 | { | 236 | { |
