r14053: Implement Simo's suggestion: don't use /dev/null for a 'bad' path for
[Samba.git] / source / script / uninstallbin.sh
blob5d39b7988289703dbeb0f129505e58abed257368
1 #!/bin/sh
2 #4 July 96 Dan.Shearer@UniSA.edu.au
4 INSTALLPERMS=$1
5 DESTDIR=$2
6 BINDIR=`echo $3 | sed 's/\/\//\//g'`
7 shift
8 shift
9 shift
11 if [ ! -d $DESTDIR/$BINDIR ]; then
12 echo "Directory $DESTDIR/$BINDIR does not exist! "
13 echo "Do a "make installbin" or "make install" first. "
14 exit 1
17 for p in $*; do
18 p2=`basename $p`
19 if [ -f $DESTDIR/$BINDIR/$p2 ]; then
20 echo "Removing $DESTDIR/$BINDIR/$p2 "
21 rm -f $DESTDIR/$BINDIR/$p2
22 if [ -f $DESTDIR/$BINDIR/$p2 ]; then
23 echo "Cannot remove $DESTDIR/$BINDIR/$p2 ... does $USER have privileges? "
27 # this is a special case, mount needs this in a specific location
28 if test "$p2" = smbmount -a -f "$DESTDIR/sbin/mount.smbfs"; then
29 echo "Removing $DESTDIR/sbin/mount.smbfs "
30 rm -f "$DESTDIR/sbin/mount.smbfs"
32 done
35 cat << EOF
36 ======================================================================
37 The binaries have been uninstalled. You may restore the binaries using
38 the command "make installbin" or "make install" to install binaries,
39 man pages, modules and shell scripts. You can restore a previous
40 version of the binaries (if there were any) using "make revert".
41 ======================================================================
42 EOF
44 exit 0