<commit_before>size=0

for g in $(find $1 -name *.h -o -name *.cpp -o -name *.inl) 
do
	size=$(($size+1))
done

#echo "$size"

current=0
for g in $(find $1 -name *.h -o -name *.cpp -o -name *.inl) 
do
	./rem-componentmodel.awk $g > buff
	cat buff > $g
	current=$(($current+1))
	#rate=$(echo "$current / $size" | bc -l)
	rate=$(($current*100 / $size))
	echo -ne "Progression : $rate%\r"
done

rm -f buff<commit_msg>r7378/sofa-dev : UPDATE: give rights on script + improve error detection<commit_after>size=0

for g in $(find $1 -name *.h -o -name *.cpp -o -name *.inl) 
do
	size=$(($size+1))
done

echo "$size"

current=0
for g in $(find $1 -name *.h -o -name *.cpp -o -name *.inl) 
do
	#echo "$g"
	awk -f rem-componentmodel.awk "$g" > buff
 
	if [ -s buff ]
	then
		cat buff > "$g"
		current=$(($current+1))
		#rate=$(echo "$current / $size" | bc -l)
		rate=$(($current*100 / $size))
		echo -ne "Progression : $rate%\r"
	else
		echo "Erreur in $g"
	fi
done

#rm -f buff
{'fraction_non_alphanumeric': 0.21052631578947367, 'fraction_numerical': 0.022703818369453045, 'mean_word_length': 2.9917695473251027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4985562', 'n_tokens_mistral': 434, 'n_tokens_neox': 403, 'n_words': 133}