<commit_before>#!/usr/bin/env bash
# Build script for github.com/mubaris/yes
# -------------------------------------
INSTALLED() {
	local loc;
	loc="$(which "$1" 2>&1)"
	if [ $? -eq 0 ] && [ -n "$loc" ]; then
		return 0
	fi

	return 1
}

BUILT() {
	# Force it to be consider built.
	case "$1" in
		"yes"|"YES"|"true"|"TRUE"|1)
			BUILD_LASTEXIT=0
			BUILD_COMPLETE=true
			BUILD_EXECUTED=true
			return 0
			;;
	esac

	# Check if it's built.
	if [ "${BUILD_COMPLETE}" = "true" ]; then
		return 0
	fi

	if [ "${BUILD_LASTEXIT}" = "FAIL" ]; then
		return 0
	fi

	return 1
}

BUILD-FIND() {
	for program in "$@"; do
		if INSTALLED "$program"; then
			printf "%s" "$program"
			return 0
		fi
	done

	return 1
}

BUILD-START() {
	BUILD_LASTERROR=""
	BUILD_EXECUTED=false
	SRC_FILENAME="$2"
	OUT_FILENAME="$(sed 's/\./-/' <<< "$(basename "$2")")"
	SRC_FILE="${SRC}/${SRC_FILENAME}"
	OUT_FILE="${BIN}/${OUT_FILENAME}"
	printf "\033[33mBuilding \033[0m%-16s\033[3m... " "$1"
}<commit_msg>Clearing BUILD_LASTEXIT upon BUILD-START<commit_after>#!/usr/bin/env bash
# Build script for github.com/mubaris/yes
# -------------------------------------
INSTALLED() {
	local loc;
	loc="$(which "$1" 2>&1)"
	if [ $? -eq 0 ] && [ -n "$loc" ]; then
		return 0
	fi

	return 1
}

BUILT() {
	# Force it to be consider built.
	case "$1" in
		"yes"|"YES"|"true"|"TRUE"|1)
			BUILD_LASTEXIT=0
			BUILD_COMPLETE=true
			BUILD_EXECUTED=true
			return 0
			;;
	esac

	# Check if it's built.
	if [ "${BUILD_COMPLETE}" = "true" ]; then
		return 0
	fi

	if [ "${BUILD_LASTEXIT}" = "FAIL" ]; then
		return 0
	fi

	return 1
}

BUILD-FIND() {
	for program in "$@"; do
		if INSTALLED "$program"; then
			printf "%s" "$program"
			return 0
		fi
	done

	return 1
}

BUILD-START() {
	BUILD_LASTERROR=""
	BUILD_LASTEXIT=""
	BUILD_EXECUTED=false
	SRC_FILENAME="$2"
	OUT_FILENAME="$(sed 's/\./-/' <<< "$(basename "$2")")"
	SRC_FILE="${SRC}/${SRC_FILENAME}"
	OUT_FILE="${BIN}/${OUT_FILENAME}"
	printf "\033[33mBuilding \033[0m%-16s\033[3m... " "$1"
}
{'fraction_non_alphanumeric': 0.22731804586241275, 'fraction_numerical': 0.03290129611166501, 'mean_word_length': 2.9742574257425742, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1927668', 'n_tokens_mistral': 924, 'n_tokens_neox': 807, 'n_words': 188}