aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-04-15 17:00:01 +0000
committerMike Buland <eichlan@xagasoft.com>2012-04-15 17:00:01 +0000
commit8e3c106284d21e281edb527049c7d0bf76fdbb2d (patch)
tree5f2f66431362d908d73a3ac301ac50b97ddb2963
parentea17d3262924f95a4fa721b3de6d7fe499bdcf14 (diff)
downloadbuild-8e3c106284d21e281edb527049c7d0bf76fdbb2d.tar.gz
build-8e3c106284d21e281edb527049c7d0bf76fdbb2d.tar.bz2
build-8e3c106284d21e281edb527049c7d0bf76fdbb2d.tar.xz
build-8e3c106284d21e281edb527049c7d0bf76fdbb2d.zip
Minor tweak to the shell-execute substring parser. You can escape close parens
now inside of a substring shell-execute. It's a little confusing, so i'm not 100% sure it's working right quite yet :-P
-rw-r--r--src/context.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/context.cpp b/src/context.cpp
index ce1dfee..22bea57 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -212,9 +212,20 @@ Bu::String Context::expand( const Bu::String &sInS )
212 } 212 }
213 else if( *b == '(' && iPass == 1 ) 213 else if( *b == '(' && iPass == 1 )
214 { 214 {
215 Bu::String sCmd;
215 b++; 216 b++;
216 e = b.find(')'); 217 for( e = b; e != ')'; e++ )
217 Bu::String sCmd( b, e ); 218 {
219 if( *e == '\\' && *(e+1) == ')' )
220 {
221 sCmd += ')';
222 e++;
223 }
224 else
225 sCmd += *e;
226 }
227 //e = b.find(')');
228// Bu::String sCmd( b, e );
218 Bu::String sBuf; 229 Bu::String sBuf;
219 try 230 try
220 { 231 {