<commit_before>#!/bin/bash

SCRIPTDIR=$(dirname $0)
. $SCRIPTDIR/../configs/repo.conf
. $SCRIPTDIR/../shared/common.sh
. $SCRIPTDIR/../shared/repo/${REPO}.sh

BUNDLE=$1
ARTIFACT=$2

if [ -z "$SRC_DIR" ]; then
  SRC_DIR=${JENKINS_WORKSPACE}
fi

if [ -z "$BUNDLE" ]; then
  echo "Usage: $0 <bundle> (<artifact>)"
  exit 1
fi
set -e
validateBundle $BUNDLE

getBundleFolder $BUNDLE
IFSOLD=$IFS

echo "Copying artifacts into bundle.."
IFS=";"
echo -n "  "
exec 3< $SCRIPTDIR/../configs/artifacts.csv
while read -u 3 src dst; do
  IFS=$IFSOLD
  if [ -z "$ARTIFACT" -o "$ARTIFACT" = "$src" -o "$ARTIFACT" = "$(basename $src)" ]; then
    copyArtifact ${SRC_DIR}/$src $dst
    echo -n "."
  fi
  IFS";"
done
exec 3<&-
echo
IFS=$IFSOLD
echo "done."<commit_msg>fixed typo<commit_after>#!/bin/bash

SCRIPTDIR=$(dirname $0)
. $SCRIPTDIR/../configs/repo.conf
. $SCRIPTDIR/../shared/common.sh
. $SCRIPTDIR/../shared/repo/${REPO}.sh

BUNDLE=$1
ARTIFACT=$2

if [ -z "$SRC_DIR" ]; then
  SRC_DIR=${JENKINS_WORKSPACE}
fi

if [ -z "$BUNDLE" ]; then
  echo "Usage: $0 <bundle> (<artifact>)"
  exit 1
fi
set -e
validateBundle $BUNDLE

getBundleFolder $BUNDLE
IFSOLD=$IFS

echo "Copying artifacts into bundle.."
IFS=";"
echo -n "  "
exec 3< $SCRIPTDIR/../configs/artifacts.csv
while read -u 3 src dst; do
  IFS=$IFSOLD
  if [ -z "$ARTIFACT" -o "$ARTIFACT" = "$src" -o "$ARTIFACT" = "$(basename $src)" ]; then
    copyArtifact ${SRC_DIR}/$src $dst
    echo -n "."
  fi
  IFS=";"
done
exec 3<&-
echo
IFS=$IFSOLD
echo "done."
{'fraction_non_alphanumeric': 0.19666666666666666, 'fraction_numerical': 0.010666666666666666, 'mean_word_length': 3.5484848484848484, 'pattern_counts': {'":': 0, '<': 11, '<?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': '4487892', 'n_tokens_mistral': 677, 'n_tokens_neox': 662, 'n_words': 154}