#!/bin/bash
error(){
 echo "$1"
 exit $2
}

cd $(dirname $0) || 
   error "Cannot find myself! Run the script as ./clean" 4

# clean CRASH files
rm -rf `find . -name CRASH`

# clean oxygen
cd oxygen
rm -rf *.UPF *.out tmp/*
cd ..

\rm -rf results >& /dev/null
