Re: rm -f
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Patrick Welche on 12/14/2007 9:19 AM: > There already is a safety check in libtool at > > # Don't error if the file doesn't exist and rm -f was used. > > but then there are all the cases where $RM is used. Invent a shell > function which does rm -f if its argument isn't empty? The general idiom for this is 'rm -f dummy $files', so that even if $files is empty, you are still passing an argument to rm, and the -f avoids failure on the dummy argument. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHYtkz84KuGfSFAYARAt+qAKCR75XdgE9Fz5cucJNlPUZQaE3shwCfQeGW 8kIc6AWFs59ZbQfm07vnTbw= =ebce -END PGP SIGNATURE- ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: rm -f
On Fri, Dec 14, 2007 at 12:27:48PM -0700, Eric Blake wrote: > > The general idiom for this is 'rm -f dummy $files', so that even if $files > is empty, you are still passing an argument to rm, and the -f avoids > failure on the dummy argument. Elegant! P ___ http://lists.gnu.org/mailman/listinfo/libtool