[PATCH] install-sh: Fix redundant use of the force option with the rm command

Julien ÉLIE <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Organization TrigoFACILE -- http://www.trigofacile.com/
Message-ID <[email protected]>
Hi,

You'll find below a suggestion of patch.
Or you could also remove "-f" from the initial $rmcmd definition, if you prefer.

-- 
Julien ÉLIE



As install-sh defines $rmcmd as "$rmprog -f", it is not necessary to add
a second "-f" when calling the rm command.

* lib/install-sh: Fix redundant use of the force option with the rm command

--- install-sh.orig	2018-03-17 14:18:08.701045461 +0100
+++ install-sh.rm-f	2018-03-17 14:40:03.428558746 +0100
@@ -491,9 +491,9 @@
         # file should still install successfully.
         {
           test ! -f "$dst" ||
-          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          $doit $rmcmd "$dst" 2>/dev/null ||
           { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+            { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
           } ||
           { echo "$0: cannot unlink or rename $dst" >&2
             (exit 1); exit 1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.