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

# =============================================================================
#  Constants:
# =============================================================================
__not_darwin=1
__brew_not_installed=2

make_base="cd /vowpal_wabbit;
make clean;
make vw java;"

ubuntu_base="apt-get update -qq;
apt-get install -qq software-properties-common g++ make libboost-program-options-dev zlib1g-dev default-jdk;"

ubuntu_12="$ubuntu_base
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64;
$make_base
mv java/target/vw_jni.lib java/target/vw_jni.Ubuntu.12.amd64.lib"

ubuntu_14_32="$ubuntu_base
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386;
$make_base
mv java/target/vw_jni.lib java/target/vw_jni.Ubuntu.14.i386.lib"

ubuntu_14="$ubuntu_base
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64;
$make_base
mv java/target/vw_jni.lib java/target/vw_jni.Ubuntu.14.amd64.lib"

early_red_hat="yum update -q -y;
yum install -q -y wget which zlib-devel java-1.7.0-openjdk-devel perl redhat-lsb-core;
cd /etc/yum.repos.d;
wget http://people.centos.org/tru/devtools-2/devtools-2.repo;
yum clean all;
yum install -q -y devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils;
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/;
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64;
cd /vowpal_wabbit;
cat Makefile | sed 's/-fPIC/-fpermissive -fPIC/g' > Makefile.permissive;"

red_hat_5="$early_red_hat
yum install -q -y make epel-release;
yum install -q -y boost141-devel;
make clean;
cat Makefile.permissive | sed 's/BOOST_LIBRARY\s*=\(.*\)/BOOST_LIBRARY =\1 -L \/usr\/lib64\/boost141/g' | sed 's/BOOST_INCLUDE\s*=\(.*\)/BOOST_INCLUDE =\1 -I \/usr\/include\/boost141/g' > Makefile.permissive.boost141;
make -f Makefile.permissive.boost141 vw java;
rm -f Makefile.permissive Makefile.permissive.boost141;
mv java/target/vw_jni.lib java/target/vw_jni.Red_Hat.5.amd64.lib"

red_hat_6="$early_red_hat
yum install -q -y boost-devel;
make clean;
make -f Makefile.permissive vw java;
rm -f Makefile.permissive;
mv java/target/vw_jni.lib java/target/vw_jni.Red_Hat.6.amd64.lib"

red_hat_7="yum update -q -y;
yum install -q -y gcc-c++ make boost-devel zlib-devel java-1.7.0-openjdk-devel perl clang redhat-lsb-core;
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk;
$make_base
mv java/target/vw_jni.lib java/target/vw_jni.Red_Hat.7.amd64.lib"

# =============================================================================
#  Function Definitions:
# =============================================================================

# -----------------------------------------------------------------------------
#  Print red text to stderr.
# -----------------------------------------------------------------------------
red() {<commit_msg>Triggering build tools with another commit<commit_after>#!/usr/bin/env bash

# =============================================================================
#  Constants:
# =============================================================================
__not_darwin=1
__brew_not_installed=2

make_base="cd /vowpal_wabbit;
make clean;
make vw java;"

ubuntu_base="apt-get update -qq;
apt-get install -qq software-properties-common g++ make libboost-program-options-dev zlib1g-dev default-jdk;"

ubuntu_12="$ubuntu_base
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64;
$make_base
mv java/target/vw_jni.lib java/target/vw_jni.Ubuntu.12.amd64.lib"

ubuntu_14_32="$ubuntu_base
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386;
$make_base
mv java/target/vw_jni.lib java/target/vw_jni.Ubuntu.14.i386.lib"

ubuntu_14="$ubuntu_base
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64;
$make_base
mv java/target/vw_jni.lib java/target/vw_jni.Ubuntu.14.amd64.lib"

early_red_hat="yum update -q -y;
yum install -q -y wget which zlib-devel java-1.7.0-openjdk-devel perl redhat-lsb-core;
cd /etc/yum.repos.d;
wget http://people.centos.org/tru/devtools-2/devtools-2.repo;
yum clean all;
yum install -q -y devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils;
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/;
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64;
cd /vowpal_wabbit;
cat Makefile | sed 's/-fPIC/-fpermissive -fPIC/g' > Makefile.permissive;"

red_hat_5="$early_red_hat
yum install -q -y make epel-release;
yum install -q -y boost141-devel;
make clean;
cat Makefile.permissive | sed 's/BOOST_LIBRARY\s*=\(.*\)/BOOST_LIBRARY =\1 -L \/usr\/lib64\/boost141/g' | sed 's/BOOST_INCLUDE\s*=\(.*\)/BOOST_INCLUDE =\1 -I \/usr\/include\/boost141/g' > Makefile.permissive.boost141;
make -f Makefile.permissive.boost141 vw java;
rm -f Makefile.permissive.boost141 Makefile.permissive;
mv java/target/vw_jni.lib java/target/vw_jni.Red_Hat.5.amd64.lib"

red_hat_6="$early_red_hat
yum install -q -y boost-devel;
make clean;
make -f Makefile.permissive vw java;
rm -f Makefile.permissive;
mv java/target/vw_jni.lib java/target/vw_jni.Red_Hat.6.amd64.lib"

red_hat_7="yum update -q -y;
yum install -q -y gcc-c++ make boost-devel zlib-devel java-1.7.0-openjdk-devel perl clang redhat-lsb-core;
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk;
$make_base
mv java/target/vw_jni.lib java/target/vw_jni.Red_Hat.7.amd64.lib"

# =============================================================================
#  Function Definitions:
# =============================================================================

# -----------------------------------------------------------------------------
#  Print red text to stderr.
# -----------------------------------------------------------------------------
red() {
{'fraction_non_alphanumeric': 0.2928840293959491, 'fraction_numerical': 0.03226384656748521, 'mean_word_length': 3.6655518394648827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '4196685', 'n_tokens_mistral': 2291, 'n_tokens_neox': 2044, 'n_words': 355}