<commit_before>#!/bin/bash

# create log dir
LOG_DIR=$(mktemp -d /tmp/dune_rb_demos.XXXXXXXX)
LOG_FILE=$LOG_DIR/test.log
touch $LOG_FILE &> /dev/null
if [ $? != 0 ] ; then
  echo "Error: could not create: $LOG_DIR/test.log." >&2
  exit 1
else
  rm $LOG_FILE &> /dev/null
fi

echo -ne "writing path definitions... "
LOG_FILE=$LOG_DIR/gen_PATH.log
./local/bin/gen_PATH.sh &> $LOG_FILE
if [ $? == 0 ] ; then
  source PATH &>> $LOG_FILE
  echo "done"
else
  echo "failed (see $LOG_FILE for details)" >&2
  exit 1
fi

echo -ne "initializing submodules (this may take a while)... "
LOG_FILE=$LOG_DIR/initialize_submodules.log
git submodule update --init &> $LOG_FILE
if [ $? == 0 ] ; then
  echo "done"
else
  echo "failed (see $LOG_FILE for details)" >&2
  exit 1
fi

echo -ne "downloading dune modules (this may take a while)... "
LOG_FILE=$LOG_DIR/download_dune_modules.log
./local/bin/download_dune_modules.sh &> $LOG_FILE
if [ $? == 0 ] ; then
  echo "done"
else
  echo "failed (see $LOG_FILE for details)" >&2
  exit 1
fi

echo -ne "downloading external libraries (this may take a while)... "
LOG_FILE=$LOG_DIR/download_external_libraries.log
./local/bin/download_external_libraries.sh &> $LOG_FILE
if [ $? == 0 ] ; then
  echo "done"
else
  echo "failed (see $LOG_FILE for details)" >&2
  exit 1
fi

echo -ne "building external libraries (this may take a while)... "
LOG_FILE=$LOG_DIR/build_external_libraries.log
./local/bin/build_external_libraries.py &> $LOG_FILE
if [ $? == 0 ] ; then
  echo "done"<commit_msg>[local.bin.startup] update<commit_after>#!/bin/bash

# create log dir
LOG_DIR=$(mktemp -d /tmp/dune_rb_demos.XXXXXXXX)
LOG_FILE=$LOG_DIR/test.log
touch $LOG_FILE &> /dev/null
if [ $? != 0 ] ; then
  echo "Error: could not create: $LOG_DIR/test.log." >&2
  exit 1
else
  rm $LOG_FILE &> /dev/null
fi

echo -ne "writing path definitions... "
LOG_FILE=$LOG_DIR/gen_PATH.log
./local/bin/gen_PATH.sh &> $LOG_FILE
if [ $? == 0 ] ; then
  source PATH &>> $LOG_FILE
  echo "done"
else
  echo "failed (see $LOG_FILE for details)" >&2
  exit 1
fi

echo -ne "initializing submodules (this may take a while)... "
LOG_FILE=$LOG_DIR/initialize_submodules.log
git submodule update --init &> $LOG_FILE
if [ $? == 0 ] ; then
  echo "done"
else
  echo "failed (see $LOG_FILE for details)" >&2
  exit 1
fi

echo -ne "downloading external libraries (this may take a while)... "
LOG_FILE=$LOG_DIR/download_external_libraries.log
./local/bin/download_external_libraries.sh &> $LOG_FILE
if [ $? == 0 ] ; then
  echo "done"
else
  echo "failed (see $LOG_FILE for details)" >&2
  exit 1
fi

echo -ne "building external libraries (this may take a while)... "
LOG_FILE=$LOG_DIR/build_external_libraries.log
./local/bin/build_external_libraries.py &> $LOG_FILE
if [ $? == 0 ] ; then
  echo "done"
{'fraction_non_alphanumeric': 0.14588573481854114, 'fraction_numerical': 0.010420409629895796, 'mean_word_length': 3.8501742160278747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5246121', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1034, 'n_words': 295}