<commit_before>#!/bin/bash

[ "x$DOCKER" != "x" ] || DOCKER="docker.io"
[ "x$TESTS" != "x" ] || TEST="basic"

# TODO: do this in this directory and up two/shutit*
find . | grep cnf$ | xargs --no-run-if-empty chmod 0600

# Off for now
SHUTIT_PARALLEL_BUILD=
readonly SHUTIT_PARALLEL_BUILD
BUILD_REF=$(dd if=/dev/urandom bs=256 count=1 2>/dev/null | md5sum | awk '{print $1}' | sed 's/^\(....\).*/\1/')
readonly BUILD_REF

function get_abs_filename() {
        # $1 : relative filename
        echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
export SHUTIT=$(get_abs_filename $(dirname ${BASH_SOURCE[0]})/../shutit)
readonly SHUTIT
SHUTIT_TEST_REPORT=""

set -o errexit
set -o nounset
#set -x


function set_shutit_options() {
	local CNAME
	local OPTS
	CNAME=shutit_test_container_${BUILD_REF}_$(dd if=/dev/urandom bs=256 count=1 2>/dev/null | md5sum | awk '{print $1}')
	OPTS=${1:-none}
	if [[ "$OPTS" = "none" ]]
	then
		export SHUTIT_OPTIONS="-s container name $CNAME"
	else
		export SHUTIT_OPTIONS="-s container name $CNAME $OPTS"
	fi
	CNAME=shutit_test_container_${BUILD_REF}_$(dd if=/dev/urandom bs=256 count=1 2>/dev/null | md5sum | awk '{print $1}')
}

function cleanup() {
	CONTAINERS=$($DOCKER ps -a | grep shutit_test_container_${BUILD_REF} | awk '{print $1}')
	if [[ "x$CONTAINERS" != "x" ]]<commit_msg>no tag<commit_after>#!/bin/bash

[ "x$DOCKER" != "x" ] || DOCKER="docker.io"
[ "x$TESTS" != "x" ] || TEST="basic"

# TODO: do this in this directory and up two/shutit*
find . | grep cnf$ | xargs --no-run-if-empty chmod 0600

# Off for now
SHUTIT_PARALLEL_BUILD=
readonly SHUTIT_PARALLEL_BUILD
BUILD_REF=$(dd if=/dev/urandom bs=256 count=1 2>/dev/null | md5sum | awk '{print $1}' | sed 's/^\(....\).*/\1/')
readonly BUILD_REF

function get_abs_filename() {
        # $1 : relative filename
        echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
export SHUTIT=$(get_abs_filename $(dirname ${BASH_SOURCE[0]})/../shutit)
readonly SHUTIT
SHUTIT_TEST_REPORT=""

set -o errexit
set -o nounset
#set -x


function set_shutit_options() {
	local CNAME
	local OPTS
	CNAME=shutit_test_container_${BUILD_REF}_$(dd if=/dev/urandom bs=256 count=1 2>/dev/null | md5sum | awk '{print $1}')
	OPTS=${1:-none}
	if [[ "$OPTS" = "none" ]]
	then
		export SHUTIT_OPTIONS="-s container name $CNAME -s repository tag no"
	else
		export SHUTIT_OPTIONS="-s container name $CNAME $OPTS -s repository tag no"
	fi
	CNAME=shutit_test_container_${BUILD_REF}_$(dd if=/dev/urandom bs=256 count=1 2>/dev/null | md5sum | awk '{print $1}')
}

function cleanup() {
	CONTAINERS=$($DOCKER ps -a | grep shutit_test_container_${BUILD_REF} | awk '{print $1}')
	if [[ "x$CONTAINERS" != "x" ]]
{'fraction_non_alphanumeric': 0.18378782218901757, 'fraction_numerical': 0.023907358983937244, 'mean_word_length': 4.399193548387097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '485267', 'n_tokens_mistral': 1145, 'n_tokens_neox': 1066, 'n_words': 255}