<commit_before>#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

function checkDependency {
	repository=`echo $1 | cut -d'/' -f1`
	dependencyName=`echo $1 | cut -d'/' -f2`
	dependency=$dependencyName

	if [ $repository == "aur" ]; then
		repository=" (aur)";
	elif [ $repository == "synaptiko" ]; then
		repository=" (synaptiko)";
		dependency="synaptiko-$dependency";
	else
		repository="";
	fi

	if pacman -Qs $dependency &> /dev/null; then
		echo -e "  \e[32m✓\e[0m $dependency$repository"
		return 0
	else
		echo -e "  \e[31m✖\e[0m $dependency$repository"
		return 1
	fi
}

mkdir -p $DIR/.logs

for moduleDir in `find $DIR/*/ -maxdepth 1 -type d | sort`; do
	module=`basename $moduleDir`
	failedDependenciesCount=0
	
	if [ ! -f ${moduleDir}install.sh ]; then
		continue
	fi

	echo -e "\e[1m$module\e[0m module:"

	if [ -f $module/dependencies ] && [ `wc -l $module/dependencies | cut -d' ' -f1` != "0" ]; then
		echo "- checking dependencies:"
		moduleDependencies=$(<$moduleDir/dependencies)

		for dependency in $moduleDependencies; do
			if ! checkDependency $dependency; then
				((failedDependenciesCount+=1))
			fi
		done<commit_msg>Update printing of dependency name in init.sh<commit_after>#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

function checkDependency {
	repository=`echo $1 | cut -d'/' -f1`
	dependencyName=`echo $1 | cut -d'/' -f2`
	dependency=$dependencyName

	if [ $repository == "aur" ]; then
		repository=" (aur)";
	elif [ $repository == "synaptiko" ]; then
		repository=" (synaptiko)";
		dependency="synaptiko-$dependency";
	else
		repository="";
	fi

	if pacman -Qs $dependency &> /dev/null; then
		echo -e "  \e[32m✓\e[0m $dependencyName$repository"
		return 0
	else
		echo -e "  \e[31m✖\e[0m $dependencyName$repository"
		return 1
	fi
}

mkdir -p $DIR/.logs

for moduleDir in `find $DIR/*/ -maxdepth 1 -type d | sort`; do
	module=`basename $moduleDir`
	failedDependenciesCount=0
	
	if [ ! -f ${moduleDir}install.sh ]; then
		continue
	fi

	echo -e "\e[1m$module\e[0m module:"

	if [ -f $module/dependencies ] && [ `wc -l $module/dependencies | cut -d' ' -f1` != "0" ]; then
		echo "- checking dependencies:"
		moduleDependencies=$(<$moduleDir/dependencies)

		for dependency in $moduleDependencies; do
			if ! checkDependency $dependency; then
				((failedDependenciesCount+=1))
			fi
		done
{'fraction_non_alphanumeric': 0.1684873949579832, 'fraction_numerical': 0.01680672268907563, 'mean_word_length': 3.8198380566801617, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6446968', 'n_tokens_mistral': 953, 'n_tokens_neox': 838, 'n_words': 225}