summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-11-10 18:03:47 -0800
committerKarl Berry <karl@freefriends.org>2020-11-10 18:03:47 -0800
commita296ffe1eb87bec8a2f695222ac39517eaaae746 (patch)
tree0785b0c5cc723916a91d25e205327b44cb2f4351
parent9b7f0f9eeb63740bc3a89f6f80fced44355e51b7 (diff)
downloadautomake-a296ffe1eb87bec8a2f695222ac39517eaaae746.tar.gz
install-sh: new option -p to preserve mtime.
* lib/install-sh: new option -p to call cp -p. Idea from patch sent by Julien Elie: https://lists.gnu.org/archive/html/automake-patches/2018-03/msg00002.html (scriptversion): 2020-11-11.02 * NEWS: mention this. 2020-11-10 Karl Berry <karl@freefriends.org>
-rw-r--r--NEWS6
-rwxr-xr-xlib/install-sh5
2 files changed, 8 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index f4445f9c5..a6d283f7a 100644
--- a/NEWS
+++ b/NEWS
@@ -92,8 +92,10 @@ New in ?.?.?:
* Miscellaneous changes
- - install-sh tweaks: no longer unconditionally uses -f when rm is
- overridden by RMPROG; does not chown existing directories.
+ - install-sh tweaks:
+ . new option to preserve mtime, i.e., invoke cp -p.
+ . 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 4fe135050..c4f150ceb 100755
--- a/lib/install-sh
+++ b/lib/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-11-11.01; # UTC
+scriptversion=2020-11-11.02; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -108,6 +108,7 @@ Options:
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
@@ -144,6 +145,8 @@ while test $# -ne 0; do
-o) chowncmd="$chownprog $2"
shift;;
+ -p) cpprog="$cpprog -p";;
+
-s) stripcmd=$stripprog;;
-t)