#! /bin/bash
make clean
for i in $( ls -1 ); do
	if [ "`ls -1d --file-type $i | grep -o /`" = "/" ]; then
		echo -e "\e[32mcleaning $i ...\e[0m"
		cd $i
		rm -rvf ./CMakeFiles
		rm -vf ./CMakeCache.txt ./Makefile ./cmake_install.cmake ./install_manifest.txt ./*~ ./*cxx ./moc_* ./ui_* ./qrc_* ./*.o ./core
		sh ./clean
		cd ../
		echo -e "\e[32m$i cleaned\e[0m"
	fi
done
rm -rvf ./CMakeFiles
rm -vf ./CMakeCache.txt ./Makefile ./cmake_install.cmake ./install_manifest.txt ./*~ ./*cxx ./moc_* ./ui_* ./qrc_* ./*.o ./core
echo -e "\e[1;32mclean done\e[0m"
