<commit_before>#!/bin/bash

FSKIT_DIR=../
BUILD=./build
SCRIPTS=./pkg-scripts

build_package() {
   
   local dir=$1
   local build_target=$2
   local install_target=$3
   local package_script=$4
   local install_prefix=$5

   local install_dir=$BUILD/$target
   mkdir $install_dir

   if [ -n $build_target ]; then
      make -C $dir $build_target
   fi

   if [ -n $install_target ]; then
      mkdir -p $install_dir/$install_prefix
      make -C $dir $install_target PREFIX=$(realpath $install_dir/$install_prefix)
   fi
   
   if [ -n $package_script ]; then
      $SCRIPTS/$package_script $install_dir
   fi
}

rm -rf $BUILD
<commit_msg>Remove the installation directory before building a package.<commit_after>#!/bin/bash

FSKIT_DIR=../
BUILD=./build
SCRIPTS=./pkg-scripts

build_package() {
   
   local dir=$1
   local build_target=$2
   local install_target=$3
   local package_script=$4
   local install_prefix=$5

   local install_dir=$BUILD/$target
   rm -rf $install_dir
   mkdir $install_dir

   if [ -n $build_target ]; then
      make -C $dir $build_target
   fi

   if [ -n $install_target ]; then
      mkdir -p $install_dir/$install_prefix
      make -C $dir $install_target PREFIX=$(realpath $install_dir/$install_prefix)
   fi
   
   if [ -n $package_script ]; then
      $SCRIPTS/$package_script $install_dir
   fi
}

rm -rf $BUILD

{'fraction_non_alphanumeric': 0.11299852289512555, 'fraction_numerical': 0.007385524372230428, 'mean_word_length': 3.0813253012048194, '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': '4846065', 'n_tokens_mistral': 473, 'n_tokens_neox': 460, 'n_words': 114}