r14056: Also install the mount.smbfs sym link to rootsbindir. Therfore we have
[Samba.git] / source / script / uninstallbin.sh.in
blobd8a48558230322ceff86d9cd0706f7de95829528
1 #!/bin/sh
2 #4 July 96 Dan.Shearer@UniSA.edu.au
4 INSTALLPERMS=$1
5 DESTDIR=$2
6 prefix=`echo $3 | sed 's/\/\//\//g'`
7 BINDIR=`echo $4 | sed 's/\/\//\//g'`
8 shift
9 shift
10 shift
11 shift
13 if [ ! -d $DESTDIR/$BINDIR ]; then
14 echo "Directory $DESTDIR/$BINDIR does not exist! "
15 echo "Do a "make installbin" or "make install" first. "
16 exit 1
19 for p in $*; do
20 p2=`basename $p`
21 if [ -f $DESTDIR/$BINDIR/$p2 ]; then
22 echo "Removing $DESTDIR/$BINDIR/$p2 "
23 rm -f $DESTDIR/$BINDIR/$p2
24 if [ -f $DESTDIR/$BINDIR/$p2 ]; then
25 echo "Cannot remove $DESTDIR/$BINDIR/$p2 ... does $USER have privileges? "
29 # this is a special case, mount needs this in a specific location
30 if test "$p2" = smbmount -a -f "$DESTDIR/sbin/mount.smbfs"; then
31 echo "Removing $DESTDIR/sbin/mount.smbfs "
32 rm -f "$DESTDIR/@rootsbindir@/sbin/mount.smbfs"
34 done
37 cat << EOF
38 ======================================================================
39 The binaries have been uninstalled. You may restore the binaries using
40 the command "make installbin" or "make install" to install binaries,
41 man pages, modules and shell scripts. You can restore a previous
42 version of the binaries (if there were any) using "make revert".
43 ======================================================================
44 EOF
46 exit 0