<commit_before>#!/bin/bash
#
# Either:
# 1) download Carton dependencies bundle from S3 and extract it as "local/", or
# 2) build the Carton dependencies, bundle them and upload to S3
#
# Links:
# * http://blog.travis-ci.com/2012-12-18-travis-artifacts/
#

set -e
set -o errexit

if [ -z "$ARTIFACTS_AWS_REGION" ]; then
    echo "ARTIFACTS_AWS_REGION is empty, defaulting to 'us-east-1'."
    S3_REGION="us-east-1"
else
    S3_REGION="$ARTIFACTS_AWS_REGION"
fi

if [ -z "$ARTIFACTS_S3_BUCKET"]; then
    echo "ARTIFACTS_S3_BUCKET is empty, defaulting to 'travis-ci-cache-mediacloud-pypt-lt'."
    S3_BUCKET_NAME="travis-ci-cache-mediacloud-pypt-lt"
else
    S3_BUCKET_NAME="$ARTIFACTS_S3_BUCKET"
fi
S3_PATH="carton-bundles"
S3_PREFIX="local"

# ---

function bundle_id {

    if [ `uname` == 'Darwin' ]; then
        # Mac OS X
        DATE=gdate
    else
        # assume Ubuntu
        DATE=date
    fi

    # Kernel architecture, e.g. x86_64
    local OS_ARCH=`uname -m`
    if [ -z "$OS_ARCH" ]; then<commit_msg>Add missing space before "]"<commit_after>#!/bin/bash
#
# Either:
# 1) download Carton dependencies bundle from S3 and extract it as "local/", or
# 2) build the Carton dependencies, bundle them and upload to S3
#
# Links:
# * http://blog.travis-ci.com/2012-12-18-travis-artifacts/
#

set -e
set -o errexit

if [ -z "$ARTIFACTS_AWS_REGION" ]; then
    echo "ARTIFACTS_AWS_REGION is empty, defaulting to 'us-east-1'."
    S3_REGION="us-east-1"
else
    S3_REGION="$ARTIFACTS_AWS_REGION"
fi

if [ -z "$ARTIFACTS_S3_BUCKET" ]; then
    echo "ARTIFACTS_S3_BUCKET is empty, defaulting to 'travis-ci-cache-mediacloud-pypt-lt'."
    S3_BUCKET_NAME="travis-ci-cache-mediacloud-pypt-lt"
else
    S3_BUCKET_NAME="$ARTIFACTS_S3_BUCKET"
fi
S3_PATH="carton-bundles"
S3_PREFIX="local"

# ---

function bundle_id {

    if [ `uname` == 'Darwin' ]; then
        # Mac OS X
        DATE=gdate
    else
        # assume Ubuntu
        DATE=date
    fi

    # Kernel architecture, e.g. x86_64
    local OS_ARCH=`uname -m`
    if [ -z "$OS_ARCH" ]; then
{'fraction_non_alphanumeric': 0.13134765625, 'fraction_numerical': 0.0263671875, 'mean_word_length': 3.1816326530612247, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2887857', 'n_tokens_mistral': 870, 'n_tokens_neox': 840, 'n_words': 185}