<commit_before><?php

$pharName = "e621BRS";
$srcRoot = realpath("src");
$buildRoot = realpath("build");

$buildFile = 'build/e621_Batch_Reverse_Search.zip';
$ignoredFiles = ['.', '..', '.gitkeep', 'images', 'logs', 'config.cfg', 'debug_error.txt', 'build.zip', 'e621_Batch_Reverse_Search.zip', '.updatecheck'];

if (ini_get("phar.readonly") == 0) {
    echo "Building...\n";

    if (file_exists($buildRoot . '/' . $pharName . '.phar')) {
        unlink($buildRoot . '/' . $pharName . '.phar');
    }

    $phar = new Phar($buildRoot . "/" . $pharName . ".phar", FilesystemIterator::CURRENT_AS_FILEINFO, $pharName . ".phar");

    echo " Building phar...\n";
    $phar->buildFromDirectory($srcRoot, '/.php$/');
    $phar->setStub($phar->createDefaultStub("run.php"));

    echo " Copying additional files...\n";

    if (file_exists($srcRoot . "/config.cfg.example")) {
        copy($srcRoot . "/config.cfg.example", $buildRoot . "/config.cfg.example");
    }

    if (file_exists($srcRoot . "/run.bat")) {
        copy($srcRoot . "/run.bat", $buildRoot . "/run.bat");
    }

    if (file_exists($srcRoot . "/run.sh")) {
        copy($srcRoot . "/run.sh", $buildRoot . "/run.sh");
    }

    if (file_exists(__DIR__ . '/vendor/erusev/parsedown/Parsedown.php')) {
        echo " Converting markdown files into HTML...\n";<commit_msg>Fix build script<commit_after><?php

$pharName = "e621BRS";
$srcRoot = realpath("src");
$buildRoot = realpath("build");

$buildFile = 'build/e621_Batch_Reverse_Search.zip';
$ignoredFiles = ['.', '..', '.gitkeep', 'images', 'logs', 'config.cfg', 'debug_error.txt', 'build.zip', 'e621_Batch_Reverse_Search.zip', '.updatecheck'];

if (!is_dir("build/")) {
    mkdir("build/", 0755, true);
}

if (ini_get("phar.readonly") == 0) {
    echo "Building...\n";

    if (file_exists($buildRoot . '/' . $pharName . '.phar')) {
        unlink($buildRoot . '/' . $pharName . '.phar');
    }

    $phar = new Phar($buildRoot . "/" . $pharName . ".phar", FilesystemIterator::CURRENT_AS_FILEINFO, $pharName . ".phar");

    echo " Building phar...\n";
    $phar->buildFromDirectory($srcRoot, '/.php$/');
    $phar->setStub($phar->createDefaultStub("run.php"));

    echo " Copying additional files...\n";

    if (file_exists($srcRoot . "/config.cfg.example")) {
        copy($srcRoot . "/config.cfg.example", $buildRoot . "/config.cfg.example");
    }

    if (file_exists($srcRoot . "/run.bat")) {
        copy($srcRoot . "/run.bat", $buildRoot . "/run.bat");
    }

    if (file_exists($srcRoot . "/run.sh")) {
        copy($srcRoot . "/run.sh", $buildRoot . "/run.sh");
    }

    if (file_exists(__DIR__ . '/vendor/erusev/parsedown/Parsedown.php')) {
        echo " Converting markdown files into HTML...\n";
{'fraction_non_alphanumeric': 0.22344322344322345, 'fraction_numerical': 0.008791208791208791, 'mean_word_length': 3.1441578148710168, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '552139', 'n_tokens_mistral': 1015, 'n_tokens_neox': 974, 'n_words': 162}