r3780: final release notes
[Samba.git] / source / script / installbin.sh
blobf9fd5298c0972f303fb4599208e3ccb6515508dd
1 #!/bin/sh
3 INSTALLPERMS=$1
4 DESTDIR=$2
5 BASEDIR=`echo $3 | sed 's/\/\//\//g'`
6 BINDIR=`echo $4 | sed 's/\/\//\//g'`
7 LIBDIR=`echo $5 | sed 's/\/\//\//g'`
8 VARDIR=`echo $6 | sed 's/\/\//\//g'`
9 shift
10 shift
11 shift
12 shift
13 shift
14 shift
16 for 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
23 cp $p $BINDIR/
24 chmod $INSTALLPERMS $BINDIR/$p2
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
33 done
36 cat << EOF
37 ======================================================================
38 The binaries are installed. You may restore the old binaries (if there
39 were any) using the command "make revert". You may uninstall the binaries
40 using the command "make uninstallbin" or "make uninstall" to uninstall
41 binaries, man pages and shell scripts.
42 ======================================================================
43 EOF
45 exit 0