D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Makefiles - mv with wildcard that may not match anything

 

Simon Williams wrote:
> Hello everyone.
> 
> I'm trying to add something to make clean that will move all *~ files 
> into a .backups dir. The problem is that I don't want make to return an 
> error if I run make clean when there are no ~ files. 

Use find - it does not return an error code if no files exist, all the
other methods (ls, grep etc) do.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html