~vcs-imports/samba/main

« back to all changes in this revision

Viewing changes to source/script/uninstallmodules.sh

  • Committer: jerry
  • Date: 2006-07-14 21:48:39 UTC
  • Revision ID: vcs-imports@canonical.com-20060714214839-586d8c489a8fcead
gutting trunk to move to svn:externals

Show diffs side-by-side

added added

removed removed

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