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