Add support for -p and -D options to install.
authorJohn Bowler <jbowler@nslu2-linux.org>
Sun, 17 Jul 2005 01:56:02 +0000 (01:56 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 17 Jul 2005 01:56:02 +0000 (01:56 +0000)
packages/install/files/install-sh
packages/install/install-native_0.1.bb

index 0b65ee8..8de386e 100644 (file)
@@ -67,6 +67,7 @@ mvcmd="$mvprog"
 src=
 dst=
 dir_arg=
+preserve_arg=
 dstarg=
 no_target_directory=
 
@@ -81,10 +82,13 @@ In the 4th, create DIRECTORIES.
 
 Options:
 -c         (ignored)
+-D         (ignored)
 -d         create directories instead of installing files.
 -g GROUP   $chgrpprog installed files to GROUP.
 -m MODE    $chmodprog installed files to MODE.
 -o USER    $chownprog installed files to USER.
+-p         apply access/modification times of SRCFILE files
+           to corresponding DSTFILE files
 -s         $stripprog installed files.
 -t DIRECTORY  install into DIRECTORY.
 -T         report an error if DSTFILE is a directory.
@@ -100,6 +104,9 @@ while test -n "$1"; do
     -c) shift
         continue;;
 
+    -D) shift
+       continue;;
+
     -d) dir_arg=true
         shift
         continue;;
@@ -121,6 +128,10 @@ while test -n "$1"; do
         shift
         continue;;
 
+    -p) preserve_arg="-p"
+       shift
+       continue;;
+
     -s) stripcmd=$stripprog
         shift
         continue;;
@@ -265,7 +276,7 @@ do
     trap '(exit $?); exit' 1 2 13 15
 
     # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
+    $doit $cpprog $preserve_arg "$src" "$dsttmp" &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
index 2ae7df6..b912b2b 100644 (file)
@@ -6,6 +6,7 @@ SECTION = "devel"
 PRIORITY = "optional"
 LICENSE = "MIT"
 INHIBIT_DEFAULT_DEPS = "1"
+PR = "r1"
 
 SRC_URI = "file://install-sh"