<commit_before>#!/bin/bash

# -------------------------------------------------------------------
# Parametros que pueden depender de la maquina del usuario.
# -------------------------------------------------------------------

DRUPAL_VER='8.1.3'

# ===================== NO EDITAR DESPUES DE ESTO ===================

. 'functions.sh'

print "Building site............"

# Clone repo and add symblink
if [ ! -d $ROOTFS/app/project/docroot ]
then

    print "Downloading latest Drupal Core 8 ..."
    exec "wget -O - https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VER}.tar.gz | tar zxf -"
    exec "mv drupal-${DRUPAL_VER} app/project/docroot"
    exec 'ln -s project/docroot app/docroot'

    DEFAULT_DIR="$ROOTFS/app/docroot/sites/default"

    print "Adding config files ..."
    exec "cp $ROOTFS/default.settings.php $DEFAULT_DIR/settings.php"
    exec "cp $ROOTFS/settings.local.php $DEFAULT_DIR"

    print "Enabling docker and waiting a little...."
    exec "$ROOTFS/d4d up"

    sleep 15;

    print "Running a site install ..."
    exec "$ROOTFS/d4d drush si -- -y --account-name=admin --account-pass=<PASSWORD> --site-name=TestD8"

    print ''
    print '----------------------------------------------------------------------'
    print 'Ready! Point your browser to your new site. User: admin / Pass: <PASSWORD>'
    print '  http://localhost:8000'

else
    print "Directory project/docroot already exists. Aborting."
fi<commit_msg>fixes build site script<commit_after>#!/bin/bash

# -------------------------------------------------------------------
# Parametros que pueden depender de la maquina del usuario.
# -------------------------------------------------------------------

DRUPAL_VERSION='8.1.8'

# ===================== NO EDITAR DESPUES DE ESTO ===================

. 'functions.sh'

print "Building site............"

if [ ! -d $ROOTFS/app/docroot ]
then

    print "Downloading latest Drupal Core 8 ..."
    exec "wget -O /tmp/drupal-${DRUPAL_VERSION}.tar.gz https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz"
    exec "mkdir -p app/docroot && tar xf /tmp/drupal-${DRUPAL_VERSION}.tar.gz -C app/docroot --strip-components=1"

    DEFAULT_DIR="$ROOTFS/app/docroot/sites/default"

    print "Adding config files ..."
    exec "cp $ROOTFS/default.settings.php $DEFAULT_DIR/settings.php"
    exec "cp $ROOTFS/settings.local.php $DEFAULT_DIR"

    print "Enabling docker and waiting a little...."
    exec "$ROOTFS/d4d up"

    print "Running a site install ..."
    exec "$ROOTFS/d4d drush si -- -y --account-name=admin --account-pass=<PASSWORD> --site-name=TestD8"

    print ''
    print '----------------------------------------------------------------------'
    print 'Ready! Point your browser to your new site. User: admin / Pass: <PASSWORD>'
    print '  http://localhost'

else
    print "Directory project/docroot already exists. Aborting."
fi
{'fraction_non_alphanumeric': 0.2892561983471074, 'fraction_numerical': 0.007231404958677686, 'mean_word_length': 1.8396871945259041, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2040179', 'n_tokens_mistral': 877, 'n_tokens_neox': 835, 'n_words': 221}