<commit_before>#!/usr/bin/env bash
# -*- ENCODING: UTF-8 -*-

echo "Atom builder for Fedora"

if [[ -z $ROOT_DIR ]]; then
    # Current script directory
    declare -xr ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
fi

. "$ROOT_DIR/config/init"

if [[ $? -ne 0 ]]; then
    echo "Internal Error: Inicialize."
    exit 1
fi

function bash_header() {
    clear
    echo_separator "#"
    echo "# Atom Builder for Fedora"
    echo "# by @nelson6e65         "
    echo_separator "#"
}

bash_header

echo_header "Directories that will be used" "-"
dir=$(font_bold "$ROOT_DIR")
echo "Root working directory: '$dir'"
dir=$(font_bold "$ROOT_DIR")
echo "Sources directory:      '$dir'"

log_cd "$ROOT_DIR"

declare -i errors=$E_NONE

script/install-dependencies
errors=$(( errors | $? ))

# pause

script/get-sources
errors=$(( errors | $? ))

if [[ $errors -eq 0 ]]; then
    script/build-sources
    errors=$(( errors | $? ))
else
    echo "Sources is needed"
fi


if [[ $errors -eq 0 ]]; then
    script/build-rpm
    errors=$(( errors | $? ))
else
    echo "Build sources is needed"
fi

echo "Total:"
echo_result $errors

exit $errors<commit_msg>add: Success message in main script.<commit_after>#!/usr/bin/env bash
# -*- ENCODING: UTF-8 -*-

echo "Atom builder for Fedora"

if [[ -z $ROOT_DIR ]]; then
    # Current script directory
    declare -xr ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
fi

. "$ROOT_DIR/config/init"

if [[ $? -ne 0 ]]; then
    echo "Internal Error: Inicialize."
    exit 1
fi

function bash_header() {
    clear
    echo_separator "#"
    echo "# Atom Builder for Fedora"
    echo "# by @nelson6e65         "
    echo_separator "#"
}

bash_header

echo_header "Directories that will be used" "-"
dir=$(font_bold "$ROOT_DIR")
echo "Root working directory: '$dir'"
dir=$(font_bold "$ROOT_DIR")
echo "Sources directory:      '$dir'"

log_cd "$ROOT_DIR"

declare -i errors=$E_NONE

script/install-dependencies
errors=$(( errors | $? ))

# pause

script/get-sources
errors=$(( errors | $? ))

if [[ $errors -eq 0 ]]; then
    script/build-sources
    errors=$(( errors | $? ))
else
    echo "Sources is needed"
fi


if [[ $errors -eq 0 ]]; then
    script/build-rpm
    errors=$(( errors | $? ))
else
    echo "Build sources is needed"
fi

echo "Total:"
echo_result $errors

if [[ $errors -eq 0 ]]; then
    echo "Done! You can install Atom via 'atom-*.rpm' file located in './dist' directory"
    log_cd "$ROOT_DIR/dist"
    ls
fi

pause

exit $errors
{'fraction_non_alphanumeric': 0.15905448717948717, 'fraction_numerical': 0.007612179487179487, 'mean_word_length': 3.2037037037037037, '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': '5402712', 'n_tokens_mistral': 902, 'n_tokens_neox': 860, 'n_words': 259}