<commit_before>#!/bin/bash
# you can either set the environment variables AUTOCONF, AUTOHEADER, AUTOMAKE,
# ACLOCAL, AUTOPOINT and/or LIBTOOLIZE to the right versions, or leave them
# unset and get the defaults

SRC_DIR=`pwd`

if [ -d .git ]; then
  rm -fr kms-dtls-plugins
  git submodule init
  git submodule update
fi

autoreconf --verbose --force --install || {
 echo 'autogen.sh failed';
 exit 1;
}

if [[ -z "$BUILD_DIR" ]]; then
  BUILD_DIR=$SRC_DIR
fi

if [ ! -d $BUILD_DIR ]; then
 mkdir $BUILD_DIR
fi

cd $BUILD_DIR

$SRC_DIR/configure $@ || {
 echo 'configure failed';
 cd $SRC_DIR
 exit 1;
}

cd $SRC_DIR
# install pre-commit hook for doing clean commits
GIT_DIR=`git rev-parse --git-dir`
if test ! \( -x $GIT_DIR/hooks/pre-commit -a -L $GIT_DIR/hooks/pre-commit \);
then
rm -f $GIT_DIR/hooks/pre-commit
ln -s ../../hooks/pre-commit.hook $GIT_DIR/hooks/pre-commit
fi

if [ $SRC_DIR == $BUILD_DIR ]; then
 MAKE_STR="make"
else

 MAKE_STR="cd ${BUILD_DIR#$SRC_DIR}; make"
fi

echo
echo "Now type '$MAKE_STR' to compile this module."
echo
<commit_msg>autogen.sh: not test if .git is a directory<commit_after>#!/bin/bash
# you can either set the environment variables AUTOCONF, AUTOHEADER, AUTOMAKE,
# ACLOCAL, AUTOPOINT and/or LIBTOOLIZE to the right versions, or leave them
# unset and get the defaults

SRC_DIR=`pwd`

if [ .git ]; then
  rm -fr kms-dtls-plugins
  git submodule init
  git submodule update
fi

autoreconf --verbose --force --install || {
 echo 'autogen.sh failed';
 exit 1;
}

if [[ -z "$BUILD_DIR" ]]; then
  BUILD_DIR=$SRC_DIR
fi

if [ ! -d $BUILD_DIR ]; then
 mkdir $BUILD_DIR
fi

cd $BUILD_DIR

$SRC_DIR/configure $@ || {
 echo 'configure failed';
 cd $SRC_DIR
 exit 1;
}

cd $SRC_DIR
# install pre-commit hook for doing clean commits
GIT_DIR=`git rev-parse --git-dir`
if test ! \( -x $GIT_DIR/hooks/pre-commit -a -L $GIT_DIR/hooks/pre-commit \);
then
rm -f $GIT_DIR/hooks/pre-commit
ln -s ../../hooks/pre-commit.hook $GIT_DIR/hooks/pre-commit
fi

if [ $SRC_DIR == $BUILD_DIR ]; then
 MAKE_STR="make"
else

 MAKE_STR="cd ${BUILD_DIR#$SRC_DIR}; make"
fi

echo
echo "Now type '$MAKE_STR' to compile this module."
echo

{'fraction_non_alphanumeric': 0.136003726129483, 'fraction_numerical': 0.0018630647414997672, 'mean_word_length': 3.6899563318777293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4504494', 'n_tokens_mistral': 837, 'n_tokens_neox': 816, 'n_words': 250}