<commit_before>#!/usr/bin/env bash

set -ex;

DB_USER=root
DB_NAME=wordpress
PORT=8080
WP_PATH=/tmp/wordpress
WP_TITLE='Welcome to the WordPress'
WP_DESC='Hello World!'

if [ -e "$WP_PATH/wp-config.php" ]; then
    open http://127.0.0.1:$PORT
    bin/wp server --host=0.0.0.0 --port=$PORT --docroot=$WP_PATH
    exit 0
fi

if ! bin/wp --info ; then
    curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar
    rm -fr bin && mkdir bin
    mv wp-cli-nightly.phar bin/wp
    chmod 755 bin/wp
fi

echo "path: www" > $(pwd)/wp-cli.yml

bin/wp core download --path=$WP_PATH --locale=en_US --force

bin/wp core config \
--path=$WP_PATH \
--dbhost=localhost \
--dbname=$DB_NAME \
--dbuser=$DB_USER \
--dbprefix=wp_ \
--locale=en_US \
--extra-php <<PHP
define( 'JETPACK_DEV_DEBUG', true );
define( 'WP_DEBUG', true );
PHP

bin/wp core install \
--path=$WP_PATH \
--url=http://127.0.0.1:$PORT \
--title="WordPress" \
--admin_user="admin" \<commit_msg>remove unused scripts<commit_after>#!/usr/bin/env bash

set -ex;

DB_USER=root
DB_NAME=wordpress
PORT=8080
WP_PATH=/tmp/wordpress
WP_TITLE='Welcome to the WordPress'
WP_DESC='Hello World!'

if ! bin/wp --info ; then
    curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar
    rm -fr bin && mkdir bin
    mv wp-cli-nightly.phar bin/wp
    chmod 755 bin/wp
fi

bin/wp core download --path=$WP_PATH --locale=en_US --force

bin/wp core config \
--path=$WP_PATH \
--dbhost=localhost \
--dbname=$DB_NAME \
--dbuser=$DB_USER \
--dbprefix=wp_ \
--locale=en_US \
--extra-php <<PHP
define( 'JETPACK_DEV_DEBUG', true );
define( 'WP_DEBUG', true );
PHP

bin/wp core install \
--path=$WP_PATH \
--url=http://127.0.0.1:$PORT \
--title="WordPress" \
--admin_user="admin" \
{'fraction_non_alphanumeric': 0.18104906937394247, 'fraction_numerical': 0.02086858432036097, 'mean_word_length': 3.203791469194313, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 4, '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': '1600675', 'n_tokens_mistral': 746, 'n_tokens_neox': 707, 'n_words': 148}