3 # $XFree86: xc/config/util/bsdinst.sh,v 3.3 1996/12/23 05:56:13 dawes Exp $
5 # This accepts bsd-style install arguments and makes the appropriate calls
6 # to the System V install.
7 # $XConsortium: bsdinst.sh /main/8 1996/09/28 16:16:11 rws $
18 while [ x$1 != x ]; do
23 -m) flags="$flags $1 $2 "
29 -o) flags="$flags -u $2 "
35 -g) flags="$flags $1 $2 "
58 echo "$0: no input file specified"
64 echo "$0: no destination specified"
68 if [ -x /usr/ucb/install ]
72 dst=$dst/`basename "$src"`
76 bargs="-g other $bargs"
79 /usr/ucb/install $bargs
80 if [ x$dostrip = xstrip -a -x /usr/bin/mcs ]
93 flags="$flags -u root"
100 # set up some variable to be used later
105 # if the destination isn't a directory we'll need to copy it first
109 dstbase=`basename $dst`
110 cp $src /tmp/$dstbase
111 rmcmd="rm -f /tmp/$dstbase"
114 dst="`echo $dst | sed 's,^\(.*\)/.*$,\1,'`"
122 # If the src file has a directory, copy it to /tmp to make install happy
124 srcbase=`basename $src`
126 if [ "$src" != "$srcbase" ] && [ "$src" != "./$srcbase" ]
128 cp $src /tmp/$srcbase
131 rmcmd="rm -f /tmp/$srcbase"
134 # do the actual install
136 if [ -f /usr/sbin/install ]
138 installcmd=/usr/sbin/install
139 elif [ -f /etc/install ]
141 installcmd=/etc/install
146 # This rm is commented out because some people want to be able to
147 # install through symbolic links. Uncomment it if it offends you.
148 # rm -f $dst/$srcbase
149 (cd $srcdir ; $installcmd -f $dst $flags $src)
151 if [ x$dostrip = xstrip ]
154 if [ -x /usr/bin/mcs ]
156 /usr/bin/mcs -d $dst/$srcbase
162 chmod $mode $dst/$srcbase