Bruce Dubbs wrote:
> Chris Staub wrote:
>> On 11/19/2009 07:51 PM, Bruce Dubbs wrote:
>>> The problem is that find is returning a full path.  That will copy all
>>> files to /usr/include.  You would have to parse each line of the find
>>> output to remove the path before the current directory.
>>>
>>> We now do:
>>>
>>>     make INSTALL_HDR_PATH=dest headers_install
>>>     cp -rv dest/include/* /usr/include
>>>
>>> Why not just add one line:
>>>
>>>     make INSTALL_HDR_PATH=dest headers_install
>>>     rm dest/include/linux/.*install*
>>>     cp -rv dest/include/* /usr/include
>>>
>>> That removes it before copying to /usr/include.
>>>
>> But there are the ".install" files in every subdir, not just in the 
>> "linux" dir. I use:
>>
>> find dest/include -name .install -or -name ..install.cmd | xargs rm -fv
> 
> Ahh.  I didn't realize they were in multiple directories.
> 
>    find dest/include -name .install -or -name ..install.cmd -exec rm -v 
> '{}' \;

Thanks guys, removing them at the source is obviously correct.  I'd 
prefer this variant, though:

find dest/include -name .install --or -name ..install.cmd -delete

I believe that '-delete' is the recommended/race-free way of removing 
files found by find(1), though I can't find any documentation support 
this just yet.

Regards,

Matt.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to