#!/bin/sh

perlvers=5.00404

if [ "$UPS_OPTIONS" = "test" ]
then
    set -x
    BIN=/tmp/$USER/bin
    ALTBIN=/tmp/$USER/bin
else
    BIN=/usr/local/bin
    ALTBIN=${ALTBIN:=/usr/local/bin}
fi

if [ -w  ${ALTBIN} ]
then
  echo "Removing the ${ALTBIN}/setup_and_run_perl"
  rm -f ${ALTBIN}/setup_and_run_perl 
else
  echo "Not updating ${ALTBIN}, directory not writable"
fi

if [ -w ${BIN} ]
then
   for name in perl perl${perlvers} perlbug perldoc sperl${perlvers} suidperl
   do
     echo "removing  ${BIN}/${name}..."
     rm -f ${BIN}/${name}
   done
else
  echo "Not updating ${BIN}, directory not writable"
fi
