<commit_before>#!/bin/bash

if [ ! -d /ghost/content/data ]
then
  echo ">> found empty content folder - copy default contents to it..."
  cp -a /ghost/content.bak /ghost/content
fi

if [ ! -e config.js ]
then 
  echo ">> generating config"
  mv config.example.js config.js

  if [ -z ${GHOST_LISTEN_IP+x} ]
  then
    GHOST_LISTEN_IP=0.0.0.0
  fi

  if [ -z ${GHOST_URL+x} ]
  then
    GHOST_URL=http://localhost
  fi
  
  if [ -z ${GHOST_MAIL+x} ]
  then
    GHOST_MAIL=""
  fi

  echo "using the following settings:"
  echo "GHOST_LISTEN_IP = $GHOST_LISTEN_IP"
  echo "GHOST_URL       = $GHOST_URL"
  echo "GHOST_MAIL      = $GHOST_MAIL"

  sed -i "s/host: '127.0.0.1',/host: '$GHOST_LISTEN_IP',/g" config.js
  
  GHOST_URL=$(echo $GHOST_URL | sed 's/\//\\\//g')<commit_msg>fixed copy command<commit_after>#!/bin/bash

if [ ! -d /ghost/content/data ]
then
  echo ">> found empty content folder - copy default contents to it..."
  cp -a /ghost/content.bak/* /ghost/content/
fi

if [ ! -e config.js ]
then 
  echo ">> generating config"
  mv config.example.js config.js

  if [ -z ${GHOST_LISTEN_IP+x} ]
  then
    GHOST_LISTEN_IP=0.0.0.0
  fi

  if [ -z ${GHOST_URL+x} ]
  then
    GHOST_URL=http://localhost
  fi
  
  if [ -z ${GHOST_MAIL+x} ]
  then
    GHOST_MAIL=""
  fi

  echo "using the following settings:"
  echo "GHOST_LISTEN_IP = $GHOST_LISTEN_IP"
  echo "GHOST_URL       = $GHOST_URL"
  echo "GHOST_MAIL      = $GHOST_MAIL"

  sed -i "s/host: '127.0.0.1',/host: '$GHOST_LISTEN_IP',/g" config.js
  
  GHOST_URL=$(echo $GHOST_URL | sed 's/\//\\\//g')
{'fraction_non_alphanumeric': 0.15941101152368758, 'fraction_numerical': 0.012804097311139564, 'mean_word_length': 2.6776470588235295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '6839961', 'n_tokens_mistral': 675, 'n_tokens_neox': 660, 'n_words': 145}