<commit_before>source $base_dir/lib/prelude_common.bash
source $base_dir/lib/helpers.sh

work=$1
chroot=${chroot:=$work/chroot}
mkdir -p $work $chroot

# Source settings if present
if [ -f $settings_file ]
then
  source $settings_file
fi

# Source /etc/lsb-release if present
if [ -f $chroot/etc/lsb-release ]
then
  source $chroot/etc/lsb-release
fi

function pkg_mgr {
  centos_file=/etc/centos-release
  ubuntu_file=/etc/debian_version

  if [ -f $ubuntu_file ]
  then
    echo "Found $ubuntu_file - Assuming Ubuntu"
    run_in_chroot $chroot "apt-get update"
    run_in_chroot $chroot "apt-get -f -y --force-yes --no-install-recommends $*"
    run_in_chroot $chroot "apt-get clean"
  elif [ -f $centos_file ]
  then
    echo "Found $centos_file - Assuming CentOS"
    run_in_chroot $chroot "yum update"<commit_msg>pkg_mgr function looks in chroot, as intended<commit_after>source $base_dir/lib/prelude_common.bash
source $base_dir/lib/helpers.sh

work=$1
chroot=${chroot:=$work/chroot}
mkdir -p $work $chroot

# Source settings if present
if [ -f $settings_file ]
then
  source $settings_file
fi

# Source /etc/lsb-release if present
if [ -f $chroot/etc/lsb-release ]
then
  source $chroot/etc/lsb-release
fi

function pkg_mgr {
  centos_file=$chroot/etc/centos-release
  ubuntu_file=$chroot/etc/debian_version

  if [ -f $ubuntu_file ]
  then
    echo "Found $ubuntu_file - Assuming Ubuntu"
    run_in_chroot $chroot "apt-get update"
    run_in_chroot $chroot "apt-get -f -y --force-yes --no-install-recommends $*"
    run_in_chroot $chroot "apt-get clean"
  elif [ -f $centos_file ]
  then
    echo "Found $centos_file - Assuming CentOS"
    run_in_chroot $chroot "yum update"
{'fraction_non_alphanumeric': 0.11474435196195006, 'fraction_numerical': 0.0011890606420927466, 'mean_word_length': 3.822349570200573, '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': '1997145', 'n_tokens_mistral': 665, 'n_tokens_neox': 635, 'n_words': 151}