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

set -e

CHIPKIT_LIBRARY_AGREEMENT_URL="http://www.digilentinc.com/Agreement.cfm?DocID=DSD-0000318"
CHIPKIT_LIBRARY_DOWNLOAD_URL="http://www.digilentinc.com/Data/Documents/Product%20Documentation/chipKIT%20Network%20and%20USB%20Libs.zip"

git submodule update --init

if ! test -e mpide-0023-linux-20120903.tgz
then
    wget https://github.com/downloads/chipKIT32/chipKIT32-MAX/mpide-0023-linux-20120903.tgz
fi

if ! test -d mpide
then
    tar -xzf mpide-0023-linux-20120903.tgz
    mv mpide-0023-linux-20120903 mpide
fi<commit_msg>Add MPIDE download URLs for all supported platforms.<commit_after>#!/usr/bin/env bash

set -e

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

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"
fi

CHIPKIT_LIBRARY_AGREEMENT_URL="http://www.digilentinc.com/Agreement.cfm?DocID=DSD-0000318"
CHIPKIT_LIBRARY_DOWNLOAD_URL="http://www.digilentinc.com/Data/Documents/Product%20Documentation/chipKIT%20Network%20and%20USB%20Libs.zip"

if [ $OS == "cgywin" ]; then
    MPIDE_URL=https://github.com/downloads/chipKIT32/chipKIT32-MAX/mpide-0023-windows-20120903.zip
elif [ $OS == "mac" ]; then
    # TODO how can we install this locally to the mpide directory? alternatively,
    # what if we just used the linux version in OS X?
    MPIDE_URL=https://github.com/downloads/chipKIT32/chipKIT32-MAX/mpide-0023-macosx-20120903.dmg
else
    MPIDE_URL=https://github.com/downloads/chipKIT32/chipKIT32-MAX/mpide-0023-linux-20120903.tgz
fi

git submodule update --init

if ! test -e mpide-0023-linux-20120903.tgz
then
    wget $MPIDE_URL
fi

if ! test -d mpide
then
    tar -xzf mpide-0023-linux-20120903.tgz
    mv mpide-0023-linux-20120903 mpide
fi
{'fraction_non_alphanumeric': 0.13389562467053243, 'fraction_numerical': 0.09383236689509752, 'mean_word_length': 4.214285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4469756', 'n_tokens_mistral': 886, 'n_tokens_neox': 741, 'n_words': 135}