Fix string overflow due to wrong size calculation
[Samba/gebeck_regimport.git] / source3 / script / uninstallbin.sh
blob5de936fccfd3d3e5e750fca0116368a76bc1c8b9
1 #!/bin/sh
2 #4 July 96 Dan.Shearer@UniSA.edu.au
4 INSTALLPERMS=$1
5 BASEDIR=`echo $2 | sed 's/\/\//\//g'`
6 BINDIR=`echo $3 | sed 's/\/\//\//g'`
7 LIBDIR=`echo $4 | sed 's/\/\//\//g'`
8 VARDIR=`echo $5 | sed 's/\/\//\//g'`
9 shift
10 shift
11 shift
12 shift
13 shift
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
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?
30 done
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
42 exit 0