Reinplace

Craig Treleaven ctreleaven at cogeco.ca
Mon Apr 2 12:25:38 PDT 2012


At 5:14 AM +1000 4/3/12, Joshua Root wrote:
>On 2012-4-3 04:01 , Jeremy Lavergne wrote:
>>>  Nope, none of those characters have special meanings to Tcl nor 
>>>to the regular expression engine. It looks like a perfectly valid 
>>>regular expression to me. Hopefully it will become clearer to me 
>>>when I actually try to build the port. Please hold on. My computer 
>>>is currently occupied upgrading another port. When it's done, I'll 
>>>give mythtv another go.
>>
>>  I'm wondering if ' versus " matters here. All the Tcl 
>>documentation and all our existinting replace using "
>
>Yes, that is going to be an issue. Single quotes don't mean anything
>special to Tcl. Braces in Tcl do what single quotes do in sh.

Wait a minute.  The line of code at issue is:

>system "find ${configure.dir} -name \"Makefile\" -exec sed -i '' 's/ 
>-L / /g' {} \\; "

If I replace the single quotes (') double-quotes ("), I would have to 
escape them all.  Is the whole string being passed to a shell for 
expansion?  Its not hard, so I'll try it that way...

That still doesn't explain, though, why find proceeds merrily for 22 
of the 78 directories and then quits without error.

Craig


More information about the macports-dev mailing list