]> Savannah Git Hosting - gnulib.git/commitdiff
autoupdate
authorKarl Berry <karl@freefriends.org>
Tue, 27 Aug 2019 13:28:41 +0000 (06:28 -0700)
committerKarl Berry <karl@freefriends.org>
Tue, 27 Aug 2019 13:28:41 +0000 (06:28 -0700)
build-aux/install-sh

index 8175c640fe6288a75cc846567ea5506086f326f4..20d8b2eaea9c7e1a9a83cbae1b770ab021fe114c 100755 (executable)
@@ -451,7 +451,18 @@ do
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
 
     # Copy the file name to the temp name.
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+    (umask $cp_umask &&
+     { test -z "$stripcmd" || {
+        # Create $dsttmp read-write so that cp doesn't create it read-only,
+        # which would cause strip to fail.
+        if test -z "$doit"; then
+          : >"$dsttmp" # No need to fork-exec 'touch'.
+        else
+          $doit touch "$dsttmp"
+        fi
+       }
+     } &&
+     $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #