aboutsummaryrefslogtreecommitdiff
path: root/install-sh
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-04-29 13:49:57 -0700
committerHaibo Huang <hhb@google.com>2020-04-29 14:16:24 -0700
commit24c77a17e5380687755385e116cc407b9e0cdac5 (patch)
treee932df98deeb78b7fe8615fe094739eda91b8956 /install-sh
parent217d07615e14335a54eeee5fb4478f4125487514 (diff)
downloadcurl-24c77a17e5380687755385e116cc407b9e0cdac5.tar.gz
Upgrade curl to curl-7_70_0
Change-Id: I898f9e257c9b950ed79ccd16c4129ab58fd65f98
Diffstat (limited to 'install-sh')
-rwxr-xr-xinstall-sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/install-sh b/install-sh
index 8175c640f..20d8b2eae 100755
--- a/install-sh
+++ b/install-sh
@@ -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.
#