<commit_before>#!/bin/bash

DIR=$1
BUCKET=$2

if [[ $# -ne 2 ]]; then
  echo "Usage: s3sync local_dir bucket_name"
  exit 1
fi
echo "Syncing dir=$1 into s3 bucket=$2"

#sync the directory to S3
s3cmd --delete-removed sync $DIR/ s3://$BUCKET
#get the md5 sums into the temporary manifest
s3cmd --list-md5 ls s3://craigs-test<commit_msg>updated s3sync.sh script to accept config file parameter<commit_after>#!/bin/bash

DIR=$1
BUCKET=$2
if [ ! -z $3 ] 
then
  CONFIG="-c `ls ~/.s3cfg_$3`"
else
  CONFIG=""
fi

if [[ $# -lt 2 ]]; then
  echo "Usage: s3sync local_dir bucket_name"
  exit 1
fi
echo "Syncing dir=$1 into s3 bucket=$2"

#sync the directory to S3
s3cmd --delete-removed sync $DIR/ s3://$BUCKET $CONFIG
#get the md5 sums into the temporary manifest
s3cmd --list-md5 ls s3://$BUCKET $CONFIG
{'fraction_non_alphanumeric': 0.14178168130489335, 'fraction_numerical': 0.04265997490589712, 'mean_word_length': 3.8072289156626504, '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': '6756039', 'n_tokens_mistral': 319, 'n_tokens_neox': 312, 'n_words': 104}