This commit was generated by cvs2svn to compensate for changes in r30,
[samba.git] / source4 / script / uninstallbin.sh
1 #!/bin/sh
2 #4 July 96 Dan.Shearer@UniSA.edu.au   
3
4 INSTALLPERMS=$1
5 BASEDIR=$2
6 BINDIR=$3
7 LIBDIR=$4
8 VARDIR=$5
9 shift
10 shift
11 shift
12 shift
13 shift
14
15 if [ ! -d $BINDIR ]; then
16   echo Directory $BINDIR does not exist!
17   echo Do a "make installbin" or "make install" first.
18   exit 1
19 fi
20
21 for p in $*; do
22   p2=`basename $p`
23   if [ -f $BINDIR/$p2 ]; then
24     echo Removing $BINDIR/$p2
25     rm -f $BINDIR/$p2
26     if [ -f $BINDIR/$p2 ]; then
27       echo Cannot remove $BINDIR/$p2 ... does $USER have privileges?
28     fi
29   fi
30 done
31
32
33 cat << EOF
34 ======================================================================
35 The binaries have been uninstalled. You may restore the binaries using
36 the command "make installbin" or "make install" to install binaries, 
37 man pages, modules and shell scripts. You can restore a previous
38 version of the binaries (if there were any) using "make revert".
39 ======================================================================
40 EOF
41
42 exit 0