<commit_before>#!/bin/bash
# -----------------------------------------------------------------------------
#
# Copyright (C) The BioDynaMo Project.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# See the LICENSE file distributed with this work for details.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# -----------------------------------------------------------------------------

cd $1

# safety check:
# only accept directories that contain CMakeCache.txt and third_party
if ! [ -f "CMakeCache.txt" ] || ! [ -d "third_party" ] ; then
  echo "ERROR: The given directory ($1) does not contain a CMakeCache.txt file"
  echo "       nor a third_party directory. Therefore, this is likely not a"
  echo "       build directory. Aborting operation..."
  exit 1
fi

for f in *; do
  if [[ "$f" != "third_party" ]] && [[ "$f" != "CMakeCache.txt" ]]; then
    rm -rf $f
  fi
done
<commit_msg>Remove CMakeCache.txt when invoking cleanbuild<commit_after>#!/bin/bash
# -----------------------------------------------------------------------------
#
# Copyright (C) The BioDynaMo Project.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# See the LICENSE file distributed with this work for details.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# -----------------------------------------------------------------------------

cd $1

# safety check:
# only accept directories that contain CMakeCache.txt and third_party
if ! [ -f "CMakeCache.txt" ] || ! [ -d "third_party" ] ; then
  echo "ERROR: The given directory ($1) does not contain a CMakeCache.txt file"
  echo "       nor a third_party directory. Therefore, this is likely not a"
  echo "       build directory. Aborting operation..."
  exit 1
fi

for f in *; do
  if [[ "$f" != "third_party" ]]; then
    rm -rf $f
  fi
done

{'fraction_non_alphanumeric': 0.23394280356305672, 'fraction_numerical': 0.0046882325363338025, 'mean_word_length': 1.9846153846153847, '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': '2097420', 'n_tokens_mistral': 562, 'n_tokens_neox': 548, 'n_words': 238}