<commit_before>#!/bin/bash

SITE=/opt/site

bootstrap(){
  echo -e "\n"
  echo "=== BOOTSTRAP: `date` ==="
  if [ -f $SITE/requirements.txt ]
  then
    pip install -r $SITE/requirements.txt
  fi
  if [ -f $SITE/package.json ]
  then
    cd $SITE
    npm init
  fi
  if [ -f $SITE/scripts/bootstrap.sh ]
  then
    source $SITE/scripts/bootstrap.sh
  fi
}

# bootstrap logging
LOGDIR=$SITE/logs
LOGFILE=$LOGDIR/bootstrap-`date "+%Y%m%d"`.log
if [ -d $LOGDIR]
then
  mkdir -p $LOGDIR
fi

bootstrap > $LOGFILE 2>&1 &
cd $SITE
/opt/webserver/bin/hazmat-webserver $*<commit_msg>fix bootstrap.sh<commit_after>#!/bin/bash

SITE=/opt/site

bootstrap(){
  echo -e "\n"
  echo "=== BOOTSTRAP: `date` ==="
  if [ -f $SITE/requirements.txt ]
  then
    pip install -r $SITE/requirements.txt
  fi
  if [ -f $SITE/package.json ]
  then
    cd $SITE
    npm init
  fi
  if [ -f $SITE/scripts/bootstrap.sh ]
  then
    source $SITE/scripts/bootstrap.sh
  fi
}

# bootstrap logging
LOGDIR=$SITE/logs
LOGFILE=$LOGDIR/bootstrap-`date "+%Y%m%d"`.log
if [ -d $LOGDIR ]
then
  mkdir -p $LOGDIR
fi

bootstrap > $LOGFILE 2>&1 &
cd $SITE
/opt/webserver/bin/hazmat-webserver $*
{'fraction_non_alphanumeric': 0.1623263888888889, 'fraction_numerical': 0.003472222222222222, 'mean_word_length': 2.975862068965517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '190221', 'n_tokens_mistral': 493, 'n_tokens_neox': 481, 'n_words': 107}