libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm -f


From: Eric Blake
Subject: Re: rm -f
Date: Fri, 14 Dec 2007 12:27:48 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

-----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             address@hidden
-----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-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]