]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
install-sh: new option -p to preserve mtime.
authorKarl Berry <karl@freefriends.org>
Wed, 11 Nov 2020 02:03:47 +0000 (18:03 -0800)
committerKarl Berry <karl@freefriends.org>
Wed, 11 Nov 2020 02:03:47 +0000 (18:03 -0800)
* 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>

NEWS
lib/install-sh

diff --git a/NEWS b/NEWS
index f4445f9c5692352d79842eb703194827267e650a..a6d283f7ab6034b8423a2ea1a5ad1c9359959a1e 100644 (file)
--- 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.
index 4fe135050cc261b301c4f25f9e95ad127c784e8f..c4f150cebffac81312a519defffe4786c4b31aa6 100755 (executable)
@@ -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)