<commit_before>#!/usr/bin/env ruby

system('apt-get -y install awscli')

binary_name = ENV['BINARY_NAME']
Dir.glob("build-binary/binary-builder/#{binary_name}-*-linux-x64.{tar.gz,tgz}").each do |file_path|
  file_name = File.basename(file_path)
  if `aws s3 ls s3://pivotal-buildpacks/concourse-binaries/nginx/`.include? file_name
    puts "Binary #{file_name} has already been detected on s3. Skipping upload for this file"
  else
    system("aws s3 cp #{file_path} s3://pivotal-buildpacks/concourse-binaries/#{binary_name}/#{file_name}")
  end
end<commit_msg>Check for existing S3 files for all binaries<commit_after>#!/usr/bin/env ruby

system('apt-get -y install awscli')

binary_name = ENV['BINARY_NAME']
Dir.glob("build-binary/binary-builder/#{binary_name}-*-linux-x64.{tar.gz,tgz}").each do |file_path|
  file_name = File.basename(file_path)
  if `aws s3 ls s3://pivotal-buildpacks/concourse-binaries/#{binary_name}/`.include? file_name
    puts "Binary #{file_name} has already been detected on s3. Skipping upload for this file"
  else
    system("aws s3 cp #{file_path} s3://pivotal-buildpacks/concourse-binaries/#{binary_name}/#{file_name}")
  end
end
{'fraction_non_alphanumeric': 0.15060240963855423, 'fraction_numerical': 0.012908777969018933, 'mean_word_length': 4.994845360824742, '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': '1742197', 'n_tokens_mistral': 430, 'n_tokens_neox': 426, 'n_words': 88}