<commit_before>#!/bin/bash

#
# NOTE: Highly WIP!
#

PYINSTALL_TARGETS=$(find -maxdepth 2 | egrep 'aw-.*/.*\.spec')

echo "PyInstaller .spec files found"
for target in $PYINSTALL_TARGETS; do
    echo " - $target";
done
rm -rf dist build

for target in $PYINSTALL_TARGETS; do
    target_dir=$(dirname $target)

    echo
    echo "-------------------------------------"
    echo "Building $target_dir"
    pyinstaller $target --onefile --clean
done

echo
echo "-------------------------------------"
echo "Contents of ./dist"
ls -l dist
echo "-------------------------------------"

<commit_msg>Updated build script, now exits with non-zero exit code if build fails<commit_after>#!/bin/bash

#
# NOTE: Highly WIP!
#

PYINSTALL_TARGETS=$(find -maxdepth 2 | egrep 'aw-.*/.*\.spec')

echo "PyInstaller .spec files found"
for target in $PYINSTALL_TARGETS; do
    echo " - $target";
done
rm -rf dist build

for target in $PYINSTALL_TARGETS; do
    target_dir=$(dirname $target)

    echo
    echo "-------------------------------------"
    echo "Building $target_dir"
    pyinstaller $target --onefile --clean || echo "Failed to build $target" && exit 1
done

echo
echo "-------------------------------------"
echo "Contents of ./dist"
ls -l dist
echo "-------------------------------------"


{'fraction_non_alphanumeric': 0.2804972804972805, 'fraction_numerical': 0.002331002331002331, 'mean_word_length': 1.7521367521367521, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1604191', 'n_tokens_mistral': 391, 'n_tokens_neox': 371, 'n_words': 124}