mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-01 17:13:42 +02:00
40 lines
688 B
Bash
Executable File
40 lines
688 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Cleans a module directory
|
|
|
|
if [[ -z ${QP_ROOT} ]]
|
|
then
|
|
print "The QP_ROOT environment variable is not set."
|
|
print "Please reload the quantum_package.rc file."
|
|
exit -1
|
|
fi
|
|
source ${QP_ROOT}/scripts/qp_include.sh
|
|
|
|
function do_clean()
|
|
{
|
|
rm -rf -- \
|
|
IRPF90_temp IRPF90_man Makefile.depend \
|
|
$(module_handler.py print_descendant) include \
|
|
ezfio_interface.irp.f irpf90.make irpf90_entities tags $(ls_exe) *.mod
|
|
|
|
touch -c EZFIO.cfg *.ezfio_config
|
|
}
|
|
|
|
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
|
|
|