<commit_before>#!/bin/bash

# Get provisionning directory
dir=/vagrant/vagrant
scripts=$dir/scripts

# Load configuration
. "$1"

# Server configuration
if [ "$2" == "server" ]; then
    $scripts/server/user.sh
    $scripts/server/repos.sh
    $scripts/server/update.sh
    $scripts/server/start-stop-daemon.sh
    $scripts/server/ssh.sh "${CONFIG['server:ssh_key']}" "${CONFIG['server:known_hosts']}"
    $scripts/server/ntp.sh "${CONFIG['server:timezone']}"
    $scripts/server/fixes.sh
fi

# Installation
if [ "$2" == "install" ]; then
    # Get script arguments
    domain="$3"
    domains="$4"

    # Web server configuration
    if [ -f "$scripts/web/${CONFIG['web:mode']}.sh" ]; then
        $scripts/web/${CONFIG['web:mode']}.sh "$domain" "$domains" "${CONFIG['web:webroots']}" "${CONFIG['web:ssl']}"
    fi

    # PHP configuration
    if [ ${CONFIG['php:enabled']} == true ]; then
        if [ -f "$scripts/php/php-${CONFIG['php:version']}.sh" ]; then
            $scripts/php/php-${CONFIG['php:version']}.sh "${CONFIG['server:timezone']}" "${CONFIG['php:modules']}" "$scripts/php"
        fi
        if [ "${CONFIG['php:composer:enabled']}" ]; then
            $scripts/php/composer.sh "${CONFIG['php:composer:github_token']}"
        fi
        if [ "${CONFIG['php:phpunit']}" ]; then
            $scripts/php/phpunit.sh
        fi
        if [ "${CONFIG['php:blackfire:enabled']}" ]; then
            $scripts/php/blackfire.sh "${CONFIG['php:blackfire:server_id']}" "${CONFIG['php:blackfire:server_token']}"
        fi
    fi

    # Database configuration
    if [ "${CONFIG['database:sql:enabled']}" == true ] && [ -f "$scripts/database/sql/${CONFIG['database:sql:mode']}.sh" ]; then
        $scripts/database/sql/${CONFIG['database:sql:mode']}.sh "${CONFIG['server:timezone']}" "${CONFIG['database:sql:fixtures']}" "$scripts/database/sql"
    fi
    if [ "${CONFIG['database:redis:enabled']}" == true ]; then
        $scripts/database/redis.sh
    fi
    if [ "${CONFIG['database:mongodb:enabled']}" == true ]; then
        $scripts/database/mongodb.sh "${CONFIG['database:mongodb:fixtures']}" "${CONFIG['php:enabled']}"
    fi

    # Tools configuration
    if [ "${CONFIG['phpmyadmin:enabled']}" == true ]; then
        $scripts/tools/phpmyadmin.sh "${CONFIG['phpmyadmin:version']}"
    fi
    if [ "${CONFIG['nodejs:enabled']}" == true ]; then
        $scripts/tools/nodejs.sh "${CONFIG['nodejs:libraries']}"
    fi
    if [ "${CONFIG['ruby:enabled']} == true" ]; then
        $scripts/tools/ruby.sh "${CONFIG['ruby:gems']}"
    fi<commit_msg>Fixed some boolean conditions<commit_after>#!/bin/bash

# Get provisionning directory
dir=/vagrant/vagrant
scripts=$dir/scripts

# Load configuration
. "$1"

# Server configuration
if [ "$2" == "server" ]; then
    $scripts/server/user.sh
    $scripts/server/repos.sh
    $scripts/server/update.sh
    $scripts/server/start-stop-daemon.sh
    $scripts/server/ssh.sh "${CONFIG['server:ssh_key']}" "${CONFIG['server:known_hosts']}"
    $scripts/server/ntp.sh "${CONFIG['server:timezone']}"
    $scripts/server/fixes.sh
fi

# Installation
if [ "$2" == "install" ]; then
    # Get script arguments
    domain="$3"
    domains="$4"

    # Web server configuration
    if [ -f "$scripts/web/${CONFIG['web:mode']}.sh" ]; then
        $scripts/web/${CONFIG['web:mode']}.sh "$domain" "$domains" "${CONFIG['web:webroots']}" "${CONFIG['web:ssl']}"
    fi

    # PHP configuration
    if [ ${CONFIG['php:enabled']} == true ]; then
        if [ -f "$scripts/php/php-${CONFIG['php:version']}.sh" ]; then
            $scripts/php/php-${CONFIG['php:version']}.sh "${CONFIG['server:timezone']}" "${CONFIG['php:modules']}" "$scripts/php"
        fi
        if [ "${CONFIG['php:composer:enabled']}" == true ]; then
            $scripts/php/composer.sh "${CONFIG['php:composer:github_token']}"
        fi
        if [ "${CONFIG['php:phpunit']}" == true ]; then
            $scripts/php/phpunit.sh
        fi
        if [ "${CONFIG['php:blackfire:enabled']}" == true ]; then
            $scripts/php/blackfire.sh "${CONFIG['php:blackfire:server_id']}" "${CONFIG['php:blackfire:server_token']}"
        fi
    fi

    # Database configuration
    if [ "${CONFIG['database:sql:enabled']}" == true ] && [ -f "$scripts/database/sql/${CONFIG['database:sql:mode']}.sh" ]; then
        $scripts/database/sql/${CONFIG['database:sql:mode']}.sh "${CONFIG['server:timezone']}" "${CONFIG['database:sql:fixtures']}" "$scripts/database/sql"
    fi
    if [ "${CONFIG['database:redis:enabled']}" == true ]; then
        $scripts/database/redis.sh
    fi
    if [ "${CONFIG['database:mongodb:enabled']}" == true ]; then
        $scripts/database/mongodb.sh "${CONFIG['database:mongodb:fixtures']}" "${CONFIG['php:enabled']}"
    fi

    # Tools configuration
    if [ "${CONFIG['phpmyadmin:enabled']}" == true ]; then
        $scripts/tools/phpmyadmin.sh "${CONFIG['phpmyadmin:version']}"
    fi
    if [ "${CONFIG['nodejs:enabled']}" == true ]; then
        $scripts/tools/nodejs.sh "${CONFIG['nodejs:libraries']}"
    fi
    if [ "${CONFIG['ruby:enabled']} == true" ]; then
        $scripts/tools/ruby.sh "${CONFIG['ruby:gems']}"
    fi
{'fraction_non_alphanumeric': 0.21425803951956607, 'fraction_numerical': 0.0019372336303758234, 'mean_word_length': 3.577127659574468, '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': '4678181', 'n_tokens_mistral': 1660, 'n_tokens_neox': 1627, 'n_words': 271}