<commit_before>#!/bin/bash

OSMAJ=${1:-6}

set -e -x

container=$(\
	docker run \
	-d \
	centos:${OSMAJ} \
	sleep infinity
)

DST=target/centos_${OSMAJ}
mkdir -p ${DST}

docker exec ${container} mkdir -p /nginx-lua
docker cp nginx.spec.diff ${container}:/nginx-lua/nginx.spec.diff
docker cp run.sh ${container}:/nginx-lua/run.sh
docker exec ${container} chmod +x /nginx-lua/run.sh

set +x # When something fails, we still want to get the files for debugging.

docker exec -i -t ${container} /nginx-lua/run.sh ${OSMAJ} | tee ${DST}/run.log

docker cp ${container}:/root/rpmbuild ${DST}
docker cp ${container}:/nginx-lua/nginx.spec.patched ${DST}/nginx.spec.patched

docker kill ${container}
docker rm ${container}<commit_msg>fix build on jenkins<commit_after>#!/bin/bash

OSMAJ=${1:-6}

set -e -x

container=$(\
	docker run \
	-d \
	centos:${OSMAJ} \
	sleep infinity
)

DST=target/centos_${OSMAJ}
mkdir -p ${DST}

docker exec ${container} mkdir -p /nginx-lua
docker cp nginx.spec.diff ${container}:/nginx-lua/nginx.spec.diff
docker cp run.sh ${container}:/nginx-lua/run.sh
docker exec ${container} chmod +x /nginx-lua/run.sh

set +x # When something fails, we still want to get the files for debugging.

docker exec -i ${container} /nginx-lua/run.sh ${OSMAJ} | tee ${DST}/run.log

docker cp ${container}:/root/rpmbuild ${DST}
docker cp ${container}:/nginx-lua/nginx.spec.patched ${DST}/nginx.spec.patched

docker kill ${container}
docker rm ${container}
{'fraction_non_alphanumeric': 0.16873278236914602, 'fraction_numerical': 0.0027548209366391185, 'mean_word_length': 4.116197183098592, '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': '2024525', 'n_tokens_mistral': 590, 'n_tokens_neox': 554, 'n_words': 147}