<commit_before>#!/bin/bash

export DEBIAN_FRONTEND=noninteractive

VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt')

OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID)
RELEASE=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" RELEASE)
CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME)

if [[ -f /.puphpet-stuff/install-puppet ]]; then
    exit 0
fi

echo 'Installing Puppet'

if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then
    echo "Debian support coming soon"
elif [[ "${OS}" == 'centos' ]]; then
    if [ "${RELEASE}" == 6 ]; then
        rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm
        yum -y install puppet-agent

        rm -f /usr/bin/puppet
        ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet

        /opt/puppetlabs/puppet/bin/gem install deep_merge activesupport vine --no-ri --no-rdoc
    fi
fi

echo 'Finished installing Puppet'
touch /.puphpet-stuff/install-puppet<commit_msg>Adds puppet 4.3.x installation support to debian and ubuntu<commit_after>#!/bin/bash

export DEBIAN_FRONTEND=noninteractive

VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt')

OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID)
RELEASE=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" RELEASE)
CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME)

if [[ -f /.puphpet-stuff/install-puppet ]]; then
    exit 0
fi

echo 'Installing Puppet'

if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then
    URL="https://apt.puppetlabs.com/puppetlabs-release-pc1-${CODENAME}.deb"
    wget --quiet --tries=5 --connect-timeout=10 -O /.puphpet-stuff/puppetlabs-release-pc1.deb ${URL}
    dpkg -i /.puphpet-stuff/puppetlabs-release-pc1.deb
    apt-get update
    apt-get -y install puppet-agent
elif [[ "${OS}" == 'centos' ]]; then
    if [ "${RELEASE}" == 6 ]; then
        rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm
        yum -y install puppet-agent
    fi
fi

rm -f /usr/bin/puppet
ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet

/opt/puppetlabs/puppet/bin/gem install deep_merge activesupport vine --no-ri --no-rdoc

echo 'Finished installing Puppet'
touch /.puphpet-stuff/install-puppet
{'fraction_non_alphanumeric': 0.17448487505480054, 'fraction_numerical': 0.0070144673388864535, 'mean_word_length': 3.536779324055666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3002113', 'n_tokens_mistral': 996, 'n_tokens_neox': 930, 'n_words': 163}