5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
23 #ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:Install 2.3 */
25 # This shell simulates the action of the install command that
26 # is available on system V systems.
27 # It only does the part required for my makefile!
29 USAGE
="usage: Install -f Directory [-o] [-m mode] [-u owner] [-g group] File"
31 # It will copy file to Directory changes the mode, owner and
32 # group if specified. If -o is used, an existing file is moved
53 -f*) DIR
=`echo $1|sed "s/..//"`
62 -m*) MODE
=`echo $1|sed "s/..//"`
71 -u*) OWNER
=`echo $1|sed "s/..//"`
80 -g*) GROUP
=`echo $1|sed "s/..//"`
92 if [ -z "$FILE" -o -z "$DIR" ]; then
97 if [ -n "$OLD" ]; then
98 echo mv $DIR/$FILE $DIR/OLD
$FILE
99 mv $DIR/$FILE $DIR/OLD
$FILE
103 echo cp $FILE $DIR/$FILE
106 if [ -n "$GROUP" ]; then
107 echo chgrp
$GROUP $DIR/$FILE
108 chgrp
$GROUP $DIR/$FILE
111 if [ -n "$MODE" ]; then
112 echo chmod $MODE $DIR/$FILE
113 chmod $MODE $DIR/$FILE
117 if [ -n "$OWNER" ]; then
118 echo chown
$OWNER $DIR/$FILE
119 chown
$OWNER $DIR/$FILE