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

{
    set -euo pipefail

    VERSION="VERSION-GOES-HERE"
    DOWNLOAD_URL=${BATECT_DOWNLOAD_URL:-"DOWNLOAD-URL-GOES-HERE"}

    ROOT_CACHE_DIR=${BATECT_CACHE_DIR:-"$HOME/.batect/cache"}
    CACHE_DIR="$ROOT_CACHE_DIR/$VERSION"
    JAR_PATH="$CACHE_DIR/batect-$VERSION.jar"

    SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"

    function main() {
        if ! haveVersionCachedLocally; then
            download
        fi

        runApplication "$@"
    }

    function haveVersionCachedLocally() {
        [ -f "$JAR_PATH" ]
    }

    function download() {
        checkForCurl

        echo "Downloading batect version $VERSION from $DOWNLOAD_URL..."
        mkdir -p "$CACHE_DIR"
        temp_file=$(mktemp)
        curl -# --fail --show-error --location --output "$temp_file" "$DOWNLOAD_URL"<commit_msg>Add some notes to the wrapper script.<commit_after>#!/usr/bin/env bash

{
    set -euo pipefail

    # This file is part of batect.
    # Do not modify this file, it will be overwritten next time you upgrade batect.
    # You should commit this file to version control alongside the rest of your project. It should not be installed globally.
    # For more information, visit https://github.com/charleskorn/batect.

    VERSION="VERSION-GOES-HERE"
    DOWNLOAD_URL=${BATECT_DOWNLOAD_URL:-"DOWNLOAD-URL-GOES-HERE"}

    ROOT_CACHE_DIR=${BATECT_CACHE_DIR:-"$HOME/.batect/cache"}
    CACHE_DIR="$ROOT_CACHE_DIR/$VERSION"
    JAR_PATH="$CACHE_DIR/batect-$VERSION.jar"

    SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"

    function main() {
        if ! haveVersionCachedLocally; then
            download
        fi

        runApplication "$@"
    }

    function haveVersionCachedLocally() {
        [ -f "$JAR_PATH" ]
    }

    function download() {
        checkForCurl

        echo "Downloading batect version $VERSION from $DOWNLOAD_URL..."
        mkdir -p "$CACHE_DIR"
        temp_file=$(mktemp)
        curl -# --fail --show-error --location --output "$temp_file" "$DOWNLOAD_URL"
{'fraction_non_alphanumeric': 0.1382228490832158, 'fraction_numerical': 0.0018805829807240243, 'mean_word_length': 2.8550724637681157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4591290', 'n_tokens_mistral': 725, 'n_tokens_neox': 684, 'n_words': 146}