2015-03-25 23:03:51 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Cleans a module directory
|
|
|
|
|
2015-06-08 14:49:10 +02:00
|
|
|
if [[ -z ${QP_ROOT} ]]
|
2015-03-25 23:03:51 +01:00
|
|
|
then
|
2015-06-08 14:49:10 +02:00
|
|
|
print "The QP_ROOT environment variable is not set."
|
2015-03-25 23:03:51 +01:00
|
|
|
print "Please reload the quantum_package.rc file."
|
|
|
|
exit -1
|
|
|
|
fi
|
2015-06-08 14:49:10 +02:00
|
|
|
source ${QP_ROOT}/scripts/qp_include.sh
|
2015-03-25 23:03:51 +01:00
|
|
|
|
|
|
|
function do_clean()
|
|
|
|
{
|
|
|
|
rm -rf -- \
|
2015-06-11 11:58:26 +02:00
|
|
|
IRPF90_temp IRPF90_man \
|
2015-06-04 16:40:00 +02:00
|
|
|
$(module_handler.py print_descendant) include \
|
2015-04-20 10:12:08 +02:00
|
|
|
ezfio_interface.irp.f irpf90.make irpf90_entities tags $(ls_exe) *.mod
|
2015-03-25 23:03:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if [[ -z $1 ]]
|
|
|
|
then
|
|
|
|
check_current_dir_is_module
|
|
|
|
do_clean
|
|
|
|
else
|
|
|
|
check_current_dir_is_src
|
|
|
|
for i in $@
|
|
|
|
do
|
|
|
|
if [[ -d $i ]]
|
|
|
|
then
|
|
|
|
cd $i
|
|
|
|
do_clean
|
|
|
|
cd $OLDPWD
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|