<commit_before>bash "build_agent" do
  action :run
  timeout 360000
  user "root"
  group "root"
  code <<-EOH
    h=`hostname -s`
    outputdir=/agent/pkg/$h
    pkg_name=`/tmp/distro.sh | awk '{ print $1 }'`
    ext_name=`/tmp/distro.sh | awk '{ print $2 }'`
    local_pkg=`ls -tC1 $outputdir/*.$ext_name 2> /dev/null | head -n 1`
    s3cmd put --acl-public $local_pkg s3://#{node['dcm']['release_bucket']}/$pkg_name.$ext_name
  EOH
end<commit_msg>Trick s3cmd into using the file it should use<commit_after>bash "build_agent" do
  action :run
  timeout 360000
  user "root"
  group "root"

  environment 'HOME' => "/root"

  code <<-EOH
    h=`hostname -s`
    outputdir=/agent/pkg/$h
    pkg_name=`/tmp/distro.sh | awk '{ print $1 }'`
    ext_name=`/tmp/distro.sh | awk '{ print $2 }'`
    local_pkg=`ls -tC1 $outputdir/*.$ext_name 2> /dev/null | head -n 1`
    s3cmd -c /root/.s3cfg put --acl-public $local_pkg s3://#{node['dcm']['release_bucket']}/$pkg_name.$ext_name
  EOH
end
{'fraction_non_alphanumeric': 0.17820773930753564, 'fraction_numerical': 0.028513238289205704, 'mean_word_length': 3.200854700854701, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, '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': '2144699', 'n_tokens_mistral': 420, 'n_tokens_neox': 391, 'n_words': 90}