2 # $XConsortium: bsdinst.sh /main/2 1995/07/19 18:05:14 drk $
5 # This accepts bsd-style install arguments and makes the appropriate calls
6 # to the System V install.
16 while [ x$1 != x ]; do
21 -m) flags="$flags $1 $2 "
27 -o) flags="$flags -u $2 "
33 -g) flags="$flags $1 $2 "
59 flags="$flags -u root"
67 echo "bsdinst: no input file specified"
73 echo "bsdinst: no destination specified"
78 # set up some variable to be used later
83 # if the destination isn't a directory we'll need to copy it first
87 dstbase=`basename $dst`
89 rmcmd="rm -f /tmp/$dstbase"
92 dst="`echo $dst | sed 's,^\(.*\)/.*$,\1,'`"
100 # If the src file has a directory, copy it to /tmp to make install happy
102 srcbase=`basename $src`
104 if [ "$src" != "$srcbase" -a "$src" != "./$srcbase" ]
106 cp $src /tmp/$srcbase
109 rmcmd="rm -f /tmp/$srcbase"
112 # do the actual install
114 if [ -f /usr/sbin/install ]
116 installcmd=/usr/sbin/install
117 elif [ -f /etc/install ]
119 installcmd=/etc/install
124 # This rm is commented out because some people want to be able to
125 # install through symbolic links. Uncomment it if it offends you.
126 # rm -f $dst/$srcbase
127 (cd $srcdir ; $installcmd -f $dst $flags $src)
129 if [ x$dostrip = xstrip ]