<commit_before>#!/bin/bash

echo "Rust-ci putdocs starting"

DOCROOT=doc
export AWS_DEFAULT_REGION=eu-west-1
export AWS_ACCESS_KEY_ID={{ s3_access_key_id }}
export AWS_SECRET_ACCESS_KEY={{ s3_secret_access_key }}
DOCPATHS=`find $DOCROOT -name index.html | cut -d/ -f2 | paste -sd ","`

if [ ! -z "$DOCPATHS" ]; then
    echo "Uploading docs for $DOCPATHS"

    sudo apt-get install python-virtualenv > /dev/null
    virtualenv docenv > /dev/null
    . docenv/bin/activate
    pip install --quiet awscli
    aws s3 cp $DOCROOT s3://rust-ci-artifacts/artifacts/{{ project_identifier }}/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --recursive

    curl http://www.rust-ci.org/artifacts/putdocshook?build=$TRAVIS_BUILD_ID&job=$TRAVIS_JOB_ID&buildnumber=$TRAVIS_BUILD_NUMBER&token={{ rustci_token }}&docpaths=$DOCPATHS
else
    echo "No docs found in directory $DOCROOT"
fi
<commit_msg>Fix if-test in putdocs script<commit_after>#!/bin/bash

echo "Rust-ci putdocs starting"

DOCROOT=doc
export AWS_DEFAULT_REGION=eu-west-1
export AWS_ACCESS_KEY_ID={{ s3_access_key_id }}
export AWS_SECRET_ACCESS_KEY={{ s3_secret_access_key }}
DOCPATHS=`find $DOCROOT -name index.html | cut -d/ -f2 | paste -sd ","`

if [ ! -z $DOCPATHS ]; then
    echo "Uploading docs for $DOCPATHS"

    sudo apt-get install python-virtualenv > /dev/null
    virtualenv docenv > /dev/null
    . docenv/bin/activate
    pip install --quiet awscli
    aws s3 cp $DOCROOT s3://rust-ci-artifacts/artifacts/{{ project_identifier }}/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --recursive

    curl http://www.rust-ci.org/artifacts/putdocshook?build=$TRAVIS_BUILD_ID&job=$TRAVIS_JOB_ID&buildnumber=$TRAVIS_BUILD_NUMBER&token={{ rustci_token }}&docpaths=$DOCPATHS
else
    echo "No docs found in directory $DOCROOT"
fi

{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.00684931506849315, 'mean_word_length': 4.582802547770701, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2556191', 'n_tokens_mistral': 675, 'n_tokens_neox': 654, 'n_words': 136}