<commit_before>#!/bin/bash

# This script will download and setup a cross compilation environment
# for targetting Win32 from Linux. It can also be used to build on
# Windows under the MSYS/MinGW environment. It will use the GTK
# binaries from <NAME>.

TOR_URL="http://ftp.gnome.org/pub/gnome/binaries/win32";

TOR_BINARIES=( \
    glib/2.26/glib{-dev,}_2.26.0-2_win32.zip \
    pango/1.28/pango{-dev,}_1.28.0-1_win32.zip);

TOR_DEP_URL="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies";

TOR_DEPS=( \
    cairo{-dev,}_1.10.0-2_win32.zip \
    gettext-runtime-{dev-,}0.17-1.zip \
    fontconfig{-dev,}_2.8.0-2_win32.zip \
    freetype{-dev,}_2.3.12-1_win32.zip \
    expat_2.0.1-1_win32.zip \
    libpng{-dev,}_1.4.0-1_win32.zip \
    zlib{-dev,}_1.2.4-2_win32.zip );

GL_HEADER_URLS=( \
    http://cgit.freedesktop.org/mesa/mesa/plain/include/GL/gl.h \
    http://www.opengl.org/registry/api/glext.h );

GL_HEADERS=( gl.h glext.h );

function download_file ()
{
    local url="$1"; shift;
    local filename="$1"; shift;

    case "$DOWNLOAD_PROG" in
	curl)
	    curl -C - -o "$DOWNLOAD_DIR/$filename" "$url";
	    ;;
	*)
	    $DOWNLOAD_PROG -O "$DOWNLOAD_DIR/$filename" -c "$url";
	    ;;
    esac;

    if [ $? -ne 0 ]; then
	echo "Downloading ${url} failed.";
	exit 1;
    fi;
}

function guess_dir ()
{
    local var="$1"; shift;
    local suffix="$1"; shift;
    local msg="$1"; shift;<commit_msg>mingw-fetch-dependencies.sh: Don't pass -c to wget<commit_after>#!/bin/bash

# This script will download and setup a cross compilation environment
# for targetting Win32 from Linux. It can also be used to build on
# Windows under the MSYS/MinGW environment. It will use the GTK
# binaries from Tor Lillqvist.

TOR_URL="http://ftp.gnome.org/pub/gnome/binaries/win32";

TOR_BINARIES=( \
    glib/2.26/glib{-dev,}_2.26.0-2_win32.zip \
    pango/1.28/pango{-dev,}_1.28.0-1_win32.zip);

TOR_DEP_URL="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies";

TOR_DEPS=( \
    cairo{-dev,}_1.10.0-2_win32.zip \
    gettext-runtime-{dev-,}0.17-1.zip \
    fontconfig{-dev,}_2.8.0-2_win32.zip \
    freetype{-dev,}_2.3.12-1_win32.zip \
    expat_2.0.1-1_win32.zip \
    libpng{-dev,}_1.4.0-1_win32.zip \
    zlib{-dev,}_1.2.4-2_win32.zip );

GL_HEADER_URLS=( \
    http://cgit.freedesktop.org/mesa/mesa/plain/include/GL/gl.h \
    http://www.opengl.org/registry/api/glext.h );

GL_HEADERS=( gl.h glext.h );

function download_file ()
{
    local url="$1"; shift;
    local filename="$1"; shift;

    if test -f "$DOWNLOAD_DIR/$filename"; then
        echo "Skipping download of $filename because the file already exists";
        return 0;
    fi;

    case "$DOWNLOAD_PROG" in
	curl)
	    curl -o "$DOWNLOAD_DIR/$filename" "$url";
	    ;;
	*)
	    $DOWNLOAD_PROG -O "$DOWNLOAD_DIR/$filename" "$url";
	    ;;
    esac;

    if [ $? -ne 0 ]; then
	echo "Downloading ${url} failed.";
	exit 1;
    fi;
}

function guess_dir ()
{
    local var="$1"; shift;
    local suffix="$1"; shift;
    local msg="$1"; shift;
{'fraction_non_alphanumeric': 0.17422987744286186, 'fraction_numerical': 0.050016561775422325, 'mean_word_length': 2.9220779220779223, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5549620', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1210, 'n_words': 223}