r14823: committing changes for 3.0.22
[Samba.git] / source / script / uninstallmodules.sh
blobac83af3dc9057aa006c93f2f965bdfa712f62719
1 #!/bin/sh
2 #4 July 96 Dan.Shearer@UniSA.edu.au
4 INSTALLPERMS=$1
5 BASEDIR=`echo $2 | sed 's/\/\//\//g'`
6 LIBDIR=`echo $3 | sed 's/\/\//\//g'`
7 shift
8 shift
9 shift
11 if [ ! -d $LIBDIR ]; then
12 echo Directory $LIBDIR does not exist!
13 echo Do a "make installmodules" or "make install" first.
14 exit 1
17 for p in $*; do
18 p2=`basename $p`
19 if [ -f $LIBDIR/$p2 ]; then
20 echo Removing $LIBDIR/$p2
21 rm -f $LIBDIR/$p2
22 if [ -f $LIBDIR/$p2 ]; then
23 echo Cannot remove $LIBDIR/$p2 ... does $USER have privileges?
26 done
29 cat << EOF
30 ======================================================================
31 The modules have been uninstalled. You may restore the modules using
32 the command "make installmodules" or "make install" to install
33 binaries, modules, man pages and shell scripts.
34 ======================================================================
35 EOF
37 exit 0