#!/bin/tcsh
# Script to clean files after execution of a test
echo "This script will clean the directory" $PWD "from scratch files.."
echo
foreach file (`cvs update -A -P|grep '? '|awk '{print $2}'`)
  if ( ${file:e} == 'inp' ) then
     echo "This files could be a new input file you don't want to be deleted.. Do you really want it deleted?"
     if ( $1 == "-int" ) then
       echo "You requested to run the cleaning script interactively! Forget about complains!"
       rm -f $file
     else
       rm -i $file
     endif
  else
     rm -f $file
  endif
end
rm -f *.bak
