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

set -e

die() {
    echo >&2 "$@"
    exit 1
}

_pushd() {
    pushd $1 > /dev/null
}

_popd() {
    popd > /dev/null
}

_wait() {
    if [ -z $CI ]; then
        echo "Press Enter when done"
        read
    fi
}

_cygwin_error() {
    echo
    echo "Missing \"$1\" - run the Cygwin installer again and select the base package set:"
    echo "    gcc4, patchutils, git, unzip, python, python-argparse, check, curl, libsasl2, ca-certificates"
    die
}

KERNEL=`uname`
if [ ${KERNEL:0:7} == "MINGW32" ]; then
    die "Sorry, the bootstrap script doesn't support Windows - try Cygwin."
elif [ ${KERNEL:0:6} == "CYGWIN" ]; then
    OS="cygwin"
elif [ $KERNEL == "Darwin" ]; then
    OS="mac"
else
    OS="linux"
    DISTRO=`lsb_release -si`
fi

download() {
    url=$1
    filename=$2
    curl $url -L --O $filename
}

if ! command -v make >/dev/null 2>&1; then
    if [ $OS == "cygwin" ]; then
        _cygwin_error "make"
    else
        if [ $DISTRO == "arch" ]; then
            sudo pacman -S base-devel<commit_msg>Check for existence of curl in cygwin.<commit_after>#!/usr/bin/env bash

set -e

die() {
    echo >&2 "$@"
    exit 1
}

_pushd() {
    pushd $1 > /dev/null
}

_popd() {
    popd > /dev/null
}

_wait() {
    if [ -z $CI ]; then
        echo "Press Enter when done"
        read
    fi
}

_cygwin_error() {
    echo
    echo "Missing \"$1\" - run the Cygwin installer again and select the base package set:"
    echo "    gcc4, patchutils, git, unzip, python, python-argparse, check, curl, libsasl2, ca-certificates"
    die
}

KERNEL=`uname`
if [ ${KERNEL:0:7} == "MINGW32" ]; then
    die "Sorry, the bootstrap script doesn't support Windows - try Cygwin."
elif [ ${KERNEL:0:6} == "CYGWIN" ]; then
    OS="cygwin"
elif [ $KERNEL == "Darwin" ]; then
    OS="mac"
else
    OS="linux"
    DISTRO=`lsb_release -si`
fi

download() {
    url=$1
    filename=$2
    curl $url -L --O $filename
}

if [ $OS == "cygwin" ] && ! command -v curl >/dev/null 2>&1; then
    _cygwin_error "curl"
fi

if ! command -v make >/dev/null 2>&1; then
    if [ $OS == "cygwin" ]; then
        _cygwin_error "make"
    else
        if [ $DISTRO == "arch" ]; then
            sudo pacman -S base-devel
{'fraction_non_alphanumeric': 0.15784753363228698, 'fraction_numerical': 0.015246636771300448, 'mean_word_length': 2.3957382039573822, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '7087858', 'n_tokens_mistral': 885, 'n_tokens_neox': 848, 'n_words': 249}