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

# Ensure script directory is CWD
OUTPUT_DIR="${0%/*}"/output
pushd $OUTPUT_DIR

# Collect files for GitHub Releases
if [[ "${TRAVIS_TAG}x" != "x" ]]
then
    sudo mkdir ${TRAVIS_TAG}
    sudo cp -R seed.* $TRAVIS_TAG/
    sudo cp -R ../schema/*.json $TRAVIS_TAG/
    sudo cp ../../cli/output/* $TRAVIS_TAG/
fi

# Grab all available versions to place in gh-pages
if [[ "${TRAVIS_TAG}x" == "x" ]]
then
    # Place snapshot schemas
    sudo mkdir -p $OUTPUT_DIR/schema
    sudo cp ../schema/* $OUTPUT_DIR/schema

    # Place versioned spec and schemas
    for VERSION in $(cat ../../.versions)
    do
        cd $OUTPUT_DIR
        sudo mkdir -p $VERSION/schema
        cd $VERSION
        sudo wget https://github.com/ngageoint/seed/releases/download/${VERSION}/seed.html
        sudo wget https://github.com/ngageoint/seed/releases/download/${VERSION}/seed.pdf
        cd schema
        sudo wget https://github.com/ngageoint/seed/releases/download/${VERSION}/seed.manifest.schema.json
        sudo wget https://github.com/ngageoint/seed/releases/download/${VERSION}/seed.metadata.schema.json
    done
fi
popd > /dev/null<commit_msg>Fixing permissions of output directory<commit_after>#!/usr/bin/env bash

# Ensure script directory is CWD
OUTPUT_DIR="${0%/*}"/output
pushd $OUTPUT_DIR

# Collect files for GitHub Releases
if [[ "${TRAVIS_TAG}x" != "x" ]]
then
    sudo mkdir ${TRAVIS_TAG}
    sudo cp -R seed.* $TRAVIS_TAG/
    sudo cp -R ../schema/*.json $TRAVIS_TAG/
    sudo cp ../../cli/output/* $TRAVIS_TAG/
fi

# Grab all available versions to place in gh-pages
if [[ "${TRAVIS_TAG}x" == "x" ]]
then
    # Place snapshot schemas
    sudo mkdir -p $OUTPUT_DIR/schema
    sudo cp ../schema/* $OUTPUT_DIR/schema

    # Place versioned spec and schemas
    for VERSION in $(cat ../../.versions)
    do
        cd $OUTPUT_DIR
        sudo mkdir -p $VERSION/schema
        cd $VERSION
        sudo wget https://github.com/ngageoint/seed/releases/download/${VERSION}/seed.html
        sudo wget https://github.com/ngageoint/seed/releases/download/${VERSION}/seed.pdf
        cd schema
        sudo wget https://github.com/ngageoint/seed/releases/download/${VERSION}/seed.manifest.schema.json
        sudo wget https://github.com/ngageoint/seed/releases/download/${VERSION}/seed.metadata.schema.json
    done
fi

# Chown the entire output directory recursively
sudo chown -R travis:travis $OUTPUT_DIR

popd > /dev/null
{'fraction_non_alphanumeric': 0.1379028967768258, 'fraction_numerical': 0.0008159934720522236, 'mean_word_length': 2.867507886435331, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3926988', 'n_tokens_mistral': 850, 'n_tokens_neox': 801, 'n_words': 208}