<commit_before>set -x

if [ "${TRAVIS_OS_NAME}" = "osx" ] || [ "${PLATFORM}" = "mac" ]; then
    target=apple-darwin
elif [ "${OS}" = "Windows_NT" ] || [ "${PLATFORM}" = "win" ]; then
    windows=1
else
    target=unknown-linux-gnu
fi

if [ "${TRAVIS}" = "true" ] && [ "${target}" = "unknown-linux-gnu" ]; then
    # Install a 32-bit compiler for linux
    sudo apt-get update
    if [ "${BITS}" = "32" ]; then
        sudo apt-get install libssl-dev:i386
    fi
    sudo apt-get install g++-multilib lib32stdc++6
fi

host=static-rust-lang-org.s3.amazonaws.com

# Install both 64 and 32 bit libraries. Apparently travis barfs if you try to
# just install the right ones? This should enable cross compilation in the
# future anyway.
if [ -z "${windows}" ]; then
    rm -rf rustc *.tar.gz
    curl -O https://$host/dist/rust-nightly-i686-$target.tar.gz
    curl -O https://$host/dist/rust-nightly-x86_64-$target.tar.gz
    tar xfz rust-nightly-i686-$target.tar.gz
    tar xfz rust-nightly-x86_64-$target.tar.gz

    if [ "${BITS}" = "32" ]; then
        src=x86_64
        dst=i686
    else
        src=i686
        dst=x86_64
    fi
    cp -r rust-nightly-$src-$target/lib/rustlib/$src-$target \
          rust-nightly-$dst-$target/lib/rustlib
    (cd rust-nightly-$dst-$target && \
     find lib/rustlib/$src-$target/lib -type f >> \
     lib/rustlib/manifest.in)

    ./rust-nightly-$dst-$target/install.sh --prefix=rustc
    rm -rf rust-nightly-$src-$target
    rm -rf rust-nightly-$dst-$target
    rm -f rust-nightly-i686-$target.tar.gz
    rm -f rust-nightly-x86_64-$target.tar.gz
else
    rm -rf rustc *.exe
    if [ "${BITS}" = "64" ]; then
        triple=x86_64-pc-windows-gnu
    else
        triple=i686-pc-windows-gnu
    fi
    curl -O http://$host/dist/rust-nightly-$triple.exe
    innounp -y -x rust-nightly-$triple.exe
    mv '{app}' rustc
    # Don't use the bundled gcc, see rust-lang/rust#17442
    rm -rf rustc/bin/rustlib/$triple/gcc<commit_msg>The bundled gcc has moved locations<commit_after>set -x

if [ "${TRAVIS_OS_NAME}" = "osx" ] || [ "${PLATFORM}" = "mac" ]; then
    target=apple-darwin
elif [ "${OS}" = "Windows_NT" ] || [ "${PLATFORM}" = "win" ]; then
    windows=1
else
    target=unknown-linux-gnu
fi

if [ "${TRAVIS}" = "true" ] && [ "${target}" = "unknown-linux-gnu" ]; then
    # Install a 32-bit compiler for linux
    sudo apt-get update
    if [ "${BITS}" = "32" ]; then
        sudo apt-get install libssl-dev:i386
    fi
    sudo apt-get install g++-multilib lib32stdc++6
fi

host=static-rust-lang-org.s3.amazonaws.com

# Install both 64 and 32 bit libraries. Apparently travis barfs if you try to
# just install the right ones? This should enable cross compilation in the
# future anyway.
if [ -z "${windows}" ]; then
    rm -rf rustc *.tar.gz
    curl -O https://$host/dist/rust-nightly-i686-$target.tar.gz
    curl -O https://$host/dist/rust-nightly-x86_64-$target.tar.gz
    tar xfz rust-nightly-i686-$target.tar.gz
    tar xfz rust-nightly-x86_64-$target.tar.gz

    if [ "${BITS}" = "32" ]; then
        src=x86_64
        dst=i686
    else
        src=i686
        dst=x86_64
    fi
    cp -r rust-nightly-$src-$target/lib/rustlib/$src-$target \
          rust-nightly-$dst-$target/lib/rustlib
    (cd rust-nightly-$dst-$target && \
     find lib/rustlib/$src-$target/lib -type f >> \
     lib/rustlib/manifest.in)

    ./rust-nightly-$dst-$target/install.sh --prefix=rustc
    rm -rf rust-nightly-$src-$target
    rm -rf rust-nightly-$dst-$target
    rm -f rust-nightly-i686-$target.tar.gz
    rm -f rust-nightly-x86_64-$target.tar.gz
else
    rm -rf rustc *.exe
    if [ "${BITS}" = "64" ]; then
        triple=x86_64-pc-windows-gnu
    else
        triple=i686-pc-windows-gnu
    fi
    curl -O http://$host/dist/rust-nightly-$triple.exe
    innounp -y -x rust-nightly-$triple.exe
    mv '{app}' rustc
    # Don't use the bundled gcc, see rust-lang/rust#17442
    rm -rf rustc/bin/rustlib/$triple/bin
{'fraction_non_alphanumeric': 0.16151898734177214, 'fraction_numerical': 0.033924050632911394, 'mean_word_length': 2.5403225806451615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2813387', 'n_tokens_mistral': 1547, 'n_tokens_neox': 1439, 'n_words': 336}