1#!/bin/sh
2
3INSTALLPERMS=$1
4DESTDIR=$2
5BASEDIR=`echo $3 | sed 's/\/\//\//g'`
6BINDIR=`echo $4 | sed 's/\/\//\//g'`
7LIBDIR=`echo $5 | sed 's/\/\//\//g'`
8VARDIR=`echo $6 | sed 's/\/\//\//g'`
9shift
10shift
11shift
12shift
13shift
14shift
15
16for p in $*; do
17 p2=`basename $p`
18 echo Installing $p as $BINDIR/$p2
19 if [ -f $BINDIR/$p2 ]; then
20   rm -f $BINDIR/$p2.old
21   mv $BINDIR/$p2 $BINDIR/$p2.old
22 fi
23 cp $p $BINDIR/
24 chmod $INSTALLPERMS $BINDIR/$p2
25
26 # this is a special case, mount needs this in a specific location
27 if [ $p2 = smbmount ]; then
28   if [ ! -d $DESTDIR/sbin ]; then
29      mkdir $DESTDIR/sbin
30   fi 
31   ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs
32 fi
33done
34
35
36cat << EOF
37======================================================================
38The binaries are installed. You may restore the old binaries (if there
39were any) using the command "make revert". You may uninstall the binaries
40using the command "make uninstallbin" or "make uninstall" to uninstall
41binaries, man pages and shell scripts.
42======================================================================
43EOF
44
45exit 0
46