<commit_before>#!/bin/sh

source ./lib

function configure_package()
{
    show_message "Configuring nodejs..."

    show_message "\tEnabling angular in firewall..."
    firewall-cmd --permanent --zone=public --add-port=8000/tcp >> /tmp/install.log 2>&1
    show_result $?

    show_message "\tEnabling meteor in firewall..."
    firewall-cmd --permanent --zone=public --add-port=3000/tcp >> /tmp/install.log 2>&1
    show_result $?

    show_message "\tRestarting firewalld..."
    systemctl restart firewalld.service >> /tmp/install.log 2>&1
    show_result $?
}

function install_package()
{
    show_message "Installing nodejs..."

    curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo

    if [ $OS == "fedora" ]
    then
        dnf install --assumeyes nodejs yarn >> /tmp/install.log 2>&1
        show_result $?
    elif [ $OS == "rhel" ]
    then
        if [ $VERSION == "8" ]
        then
            dnf install --assumeyes nodejs yarn >> /tmp/install.log 2>&1
            show_result $?
        fi
    fi
}

while [ $# -ne 0 ]
do
    if [ $1 == "install" ]<commit_msg>node on rhel7<commit_after>#!/bin/sh

source ./lib

function configure_package()
{
    show_message "Configuring nodejs..."

    show_message "\tEnabling angular in firewall..."
    firewall-cmd --permanent --zone=public --add-port=8000/tcp >> /tmp/install.log 2>&1
    show_result $?

    show_message "\tEnabling meteor in firewall..."
    firewall-cmd --permanent --zone=public --add-port=3000/tcp >> /tmp/install.log 2>&1
    show_result $?

    show_message "\tRestarting firewalld..."
    systemctl restart firewalld.service >> /tmp/install.log 2>&1
    show_result $?
}

function install_package()
{
    show_message "Installing nodejs..."

    curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo

    if [ $OS == "fedora" ]
    then
        dnf install --assumeyes nodejs yarn >> /tmp/install.log 2>&1
        show_result $?
    elif [ $OS == "rhel" ]
    then
        if [ $VERSION == "7" ]
        then
            wget -qO- https://rpm.nodesource.com/setup_10.x | bash >> /tmp/install.log 2>&1
            yum install --assumeyes nodejs yarn >> /tmp/install.log 2>&1
            show_result $?
        elif [ $VERSION == "8" ]
        then
            dnf install --assumeyes nodejs yarn >> /tmp/install.log 2>&1
            show_result $?
        fi
    fi
}

while [ $# -ne 0 ]
do
    if [ $1 == "install" ]
{'fraction_non_alphanumeric': 0.14931945556445156, 'fraction_numerical': 0.020016012810248198, 'mean_word_length': 2.203846153846154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, 'https://': 3, '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': '6841097', 'n_tokens_mistral': 907, 'n_tokens_neox': 839, 'n_words': 200}