automake-patches
[Top][All Lists]
Advanced

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

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


From: Julien ÉLIE
Subject: [PATCH] install-sh: Fix redundant use of the force option with the rm command
Date: Sat, 17 Mar 2018 15:16:49 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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






reply via email to

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