summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-11-10 17:54:06 -0800
committerKarl Berry <karl@freefriends.org>2020-11-10 17:54:06 -0800
commit6b182dc52eff16ad583f9251fd1a6888f8d9fc2f (patch)
tree54751afceaf712b1515b71ec175f84823649505d
parent5c8d6e25d70ff54b2118c1fc9bfb1a05dbd1de29 (diff)
downloadautomake-6b182dc52eff16ad583f9251fd1a6888f8d9fc2f.tar.gz
install-sh: do not chown existing directories.
* lib/install-sh: do not chown existing directories. Original patch sent by Julien Elie: https://lists.gnu.org/archive/html/automake-patches/2018-03/msg00003.html (scriptversion): 2020-11-11.01 * NEWS: mention this.
-rw-r--r--NEWS4
-rwxr-xr-xlib/install-sh6
2 files changed, 7 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index c7d02d606..f4445f9c5 100644
--- a/NEWS
+++ b/NEWS
@@ -92,8 +92,8 @@ New in ?.?.?:
* Miscellaneous changes
- - install-sh no longer unconditionally uses -f when rm is overridden
- by RMPROG.
+ - install-sh tweaks: no longer unconditionally uses -f when rm is
+ overridden by RMPROG; does not chown existing directories.
- Removed function up_to_date_p in lib/Automake/FileUtils.pm.
We believe this function is completely unused.
diff --git a/lib/install-sh b/lib/install-sh
index 2915ff015..4fe135050 100755
--- a/lib/install-sh
+++ b/lib/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-07-26.22; # UTC
+scriptversion=2020-11-11.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -262,6 +262,10 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command