standard build script (method 2)

Lapo Luchini lapo@lapo.it
Fri Jul 12 11:05:00 GMT 2002


Charles Wilson wrote:

> Lapo Luchini wrote:
>
>>> strip() {
>>>   (cd ${instdir} && \
>>>   find . -name "*.dll" | xargs strip > /dev/null 2>&1
>>>   find . -name "*.exe" | xargs strip > /dev/null 2>&1 )
>>> }
>>
>> Shouldn't that be changed to the following?
>>
>> strip() {
>>  (cd ${instdir} && \
>>  find . -name "*.dll" | xargs strip > /dev/null 2>&1 && \
>>  find . -name "*.exe" | xargs strip > /dev/null 2>&1 )
>> } 
>
Uhm..dunno what I was thinking when I pressed the "send" button, I meant 
to send the following code:

strip() {
 (cd ${instdir} && \
 find . -name "*.dll" -or -name "*.exe" | xargs strip > /dev/null 2>&1 )
}

> No.  If there are no *.dll files, then xargs fails -- which would mean 
> that the exe's don't get stripped.

Doesn't seems "right" to me that the (sometimes normal) absence of DLLs 
should stop the thing.
You could of course reply that scripts are meant to be adapted to the 
package...

>> In some cases it gives me problems as the two lines aren't separated 
>> by anything (&& or ;)
>
> Yes, they are separated -- by an un-backslashed newline.  That's plenty. 

OK, my ignorance.

>> and moreover doing it all in a single line is a little more optimized.
>
> It's possible to optimize into non-functionality, which is what '&& \' 
> would do. 

Well I actually was talking about what I pasted this time, not that time 0=)

Lapo

-- 
Lapo 'Raist' Luchini
lapo@lapo.it (PGP & X.509 keys available)
http://www.lapo.it (ICQ UIN: 529796)





More information about the Cygwin-apps mailing list