<commit_before>#!/bin/bash

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
SOURCEDIR=$(readlink -e ${DIR}/..)
BUILDDIR=${DIR}/build
mkdir -p $BUILDDIR

build_target()
{
	DISTRO=$1
	VERSION=$2
	docker run --rm -v $SOURCEDIR:/opt/graphite-raintank $DISTRO:$VERSION /opt/graphite-raintank/pkg/build.sh $DISTRO $VERSION
}

for target in debian:wheezy debian:jessie ubuntu:trusty ubuntu:xenial centos:6 centos:7; do
	_distro=${target%:*}
    _version=${target#*:}
    build_target $_distro $_version
done
<commit_msg>allow passing build targets to build_all<commit_after>#!/bin/bash

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
SOURCEDIR=$(readlink -e ${DIR}/..)
BUILDDIR=${DIR}/build
mkdir -p $BUILDDIR
TARGETS=${1:-debian:wheezy debian:jessie ubuntu:trusty ubuntu:xenial centos:6 centos:7}
build_target()
{
	DISTRO=$1
	VERSION=$2
	docker run --rm -v $SOURCEDIR:/opt/graphite-raintank $DISTRO:$VERSION /opt/graphite-raintank/pkg/build.sh $DISTRO $VERSION
}

for target in $TARGETS; do
	_distro=${target%:*}
    _version=${target#*:}
    build_target $_distro $_version
done

{'fraction_non_alphanumeric': 0.17976513098464317, 'fraction_numerical': 0.00993676603432701, 'mean_word_length': 5.331428571428572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2080099', 'n_tokens_mistral': 463, 'n_tokens_neox': 430, 'n_words': 92}