<commit_before>#!/usr/bin/env bash
set -e
shopt -s nullglob

source config.sh

recipes=""
for arg in "${@:1}"
do
    if [ "$arg" == "--debug" ]
    then
        DEBUG=--debug
    else
        recipes+=" $arg"
    fi
done

if [ "$recipes" == "" ]
then
    recipes="$(ls -1 recipes)"
fi

cargo build --release

for recipe in $recipes
do
    if [ -e "recipes/$recipe/recipe.toml" ]
    then
        target/release/cook "$recipe"
        continue
    fi

    if [ ! -d "recipes/$recipe/source/" ]
    then
        echo -e "\033[01;38;5;155mrepo - fetching $recipe\033[0m" >&2
        ./cook.sh "$recipe" fetch
    fi

    if [ ! -d "recipes/$recipe/build/" ]
    then
        echo -e "\033[01;38;5;155mrepo - preparing $recipe\033[0m" >&2
        ./cook.sh "$recipe" prepare
    elif [ ! -d "recipes/$recipe/sysroot/" ]
    then
        echo -e "\033[01;38;5;155mrepo - repreparing $recipe\033[0m" >&2
        ./cook.sh "$recipe" unprepare prepare
    else
        TIME_SOURCE="$($FIND recipes/$recipe/source/ -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
        TIME_BUILD="$($FIND recipes/$recipe/build/ -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
        if [ "$TIME_SOURCE" -gt "$TIME_BUILD" ]
        then
            echo -e "\033[01;38;5;155mrepo - repreparing $recipe\033[0m" >&2
            ./cook.sh "$recipe" unprepare prepare
        fi<commit_msg>Do not build cookbook crate from repo.sh<commit_after>#!/usr/bin/env bash
set -e
shopt -s nullglob

source config.sh

recipes=""
for arg in "${@:1}"
do
    if [ "$arg" == "--debug" ]
    then
        DEBUG=--debug
    else
        recipes+=" $arg"
    fi
done

if [ "$recipes" == "" ]
then
    recipes="$(ls -1 recipes)"
fi

for recipe in $recipes
do
    if [ -e "recipes/$recipe/recipe.toml" ]
    then
        target/release/cook "$recipe"
        continue
    fi

    if [ ! -d "recipes/$recipe/source/" ]
    then
        echo -e "\033[01;38;5;155mrepo - fetching $recipe\033[0m" >&2
        ./cook.sh "$recipe" fetch
    fi

    if [ ! -d "recipes/$recipe/build/" ]
    then
        echo -e "\033[01;38;5;155mrepo - preparing $recipe\033[0m" >&2
        ./cook.sh "$recipe" prepare
    elif [ ! -d "recipes/$recipe/sysroot/" ]
    then
        echo -e "\033[01;38;5;155mrepo - repreparing $recipe\033[0m" >&2
        ./cook.sh "$recipe" unprepare prepare
    else
        TIME_SOURCE="$($FIND recipes/$recipe/source/ -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
        TIME_BUILD="$($FIND recipes/$recipe/build/ -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
        if [ "$TIME_SOURCE" -gt "$TIME_BUILD" ]
        then
            echo -e "\033[01;38;5;155mrepo - repreparing $recipe\033[0m" >&2
            ./cook.sh "$recipe" unprepare prepare
        fi
{'fraction_non_alphanumeric': 0.17707594038325053, 'fraction_numerical': 0.0482611781405252, 'mean_word_length': 2.0574837310195226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1097751', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1058, 'n_words': 270}