1#!/bin/sh
2#4 July 96 Dan.Shearer@UniSA.edu.au   
3
4INSTALLPERMS=$1
5DESTDIR=$2
6prefix=`echo $3 | sed 's/\/\//\//g'`
7LIBDIR=`echo $4 | sed 's/\/\//\//g'`
8shift
9shift
10shift
11shift
12
13if [ ! -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
17fi
18
19for 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
28done
29
30
31cat << EOF
32======================================================================
33The modules have been uninstalled. You may restore the modules using
34the command "make installmodules" or "make install" to install 
35binaries, modules, man pages and shell scripts. 
36======================================================================
37EOF
38
39exit 0
40