<commit_before>#!/usr/bin/env bash

function cleandir()
{
	if [[ -e Makefile ]]; then
		make -C "${1}" clean
	fi
	rm -vrf "${1}/CMakeFiles"
	rm -vf  "${1}/CMakeCache.txt"
	rm -vf  "${1}/Makefile"
	rm -vf  "${1}/cmake_install.cmake"
	rm -vf *~
	rm -vf \#*\#
}

cleandir .
cleandir samples
cleandir lib
cleandir dgr
cleandir vrpn-fake

rm -vrf doxygen-docs
rm -vrf bin/*.frag bin/*.vert
rm -vf *.exe<commit_msg>improve cleanup script<commit_after>#!/usr/bin/env bash

function cleandir()
{
	# If makefile still exists, try "make clean"
	if [[ -e Makefile ]]; then
		make -C "${1}" clean
	fi
	rm -vrf "${1}/CMakeFiles"
	rm -vf  "${1}/CMakeCache.txt"
	rm -vf  "${1}/Makefile"
	rm -vf  "${1}/cmake_install.cmake"

	# Text editor backup files:
	rm -vf *~ \#*\#
}

# Clean the current directory
cleandir .
for D in *; do # For each file and directory
    if [ -d "${D}" ]; then # If it is a directory
		if [[ -e "${D}/CMakeLists.txt" ]]; then # if CMakeLists file is present
			cleandir "${D}"
		fi
    fi
done

rm -vrf doxygen-docs
rm -vrf bin/*.frag bin/*.vert
rm -vf *.exe
{'fraction_non_alphanumeric': 0.17883895131086142, 'fraction_numerical': 0.009363295880149813, 'mean_word_length': 2.9592592592592593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1584012', 'n_tokens_mistral': 457, 'n_tokens_neox': 442, 'n_words': 134}