#!/bin/sh

# run from directory where this script is
cd `echo $0 | sed 's/\(.*\)\/.*/\1/'` # extract pathname

# check whether echo has the -e option
if test "`echo -e`" = "-e" ; then ECHO=echo ; else ECHO="echo -e" ; fi

# clean all example directories
for dir in all-electron paw-gen-test pseudo-gen pseudo-test vdw-in-tfvw
do
    if test -d $dir/results
    then
        cd $dir
        $ECHO "cleaning `pwd`...\c"
        clean.sh
        $ECHO " done"
        cd ..
    fi
done


if test -d $dir/paw-examples
   then
   cd $dir
   $ECHO "cleaning `pwd`...\c"
   ./clean
   $ECHO " done"
   cd ..
fi


rm -f INPUT_*.html INPUT_*.txt
$ECHO "cleaning all : done"
