r14056: Also install the mount.smbfs sym link to rootsbindir. Therfore we have
[Samba.git] / source / script / installbin.sh.in
blob6c578b3971afc8b69a5133d04f11ee41bb3cbdda
1 #!/bin/sh
3 INSTALLPERMS=$1
4 DESTDIR=$2
5 prefix=`echo $3 | sed 's/\/\//\//g'`
6 BINDIR=`echo $4 | sed 's/\/\//\//g'`
7 shift
8 shift
9 shift
10 shift
12 for p in $*; do
13 p2=`basename $p`
14 echo "Installing $p as $DESTDIR/$BINDIR/$p2 "
15 if [ -f $DESTDIR/$BINDIR/$p2 ]; then
16 rm -f $DESTDIR/$BINDIR/$p2.old
17 mv $DESTDIR/$BINDIR/$p2 $DESTDIR/$BINDIR/$p2.old
19 cp $p $DESTDIR/$BINDIR/
20 chmod $INSTALLPERMS $DESTDIR/$BINDIR/$p2
22 # this is a special case, mount needs this in a specific location
23 if [ $p2 = smbmount ]; then
24 if [ ! -d $DESTDIR/@rootsbindir@ ]; then
25 mkdir $DESTDIR/@rootsbindir@
27 echo "Creating sym link $DESTDIR/@rootsbindir@/mount.smbfs to $BINDIR/$p2 "
28 ln -sf $BINDIR/$p2 $DESTDIR/@rootsbindir@/mount.smbfs
30 done
33 cat << EOF
34 ======================================================================
35 The binaries are installed. You may restore the old binaries (if there
36 were any) using the command "make revert". You may uninstall the binaries
37 using the command "make uninstallbin" or "make uninstall" to uninstall
38 binaries, man pages and shell scripts.
39 ======================================================================
40 EOF
42 exit 0