<commit_before>#!/bin/sh

script_base_dir=`dirname $0`

if [ $# != 4 ]; then
    echo "Usage: $0 GPG_UID GPG_KEY_NAME DESTINATION DISTRIBUTIONS"
    echo " e.g.: $0 1BD22CD1 mitler-manager repositories/ 'fedora centos'"
    exit 1
fi

GPG_UID=$1
GPG_KEY_NAME=$2
DESTINATION=$3
DISTRIBUTIONS=$4

run()
{
    "$@"
    if test $? -ne 0; then
	echo "Failed $@"
	exit 1
    fi
}

for distribution in ${DISTRIBUTIONS}; do
    for dir in ${DESTINATION}${distribution}/*/*; do
	# "--checksum sha" is for CentOS 5. If we drop CentOS 5 support,
	# we can remove the option.
	test -d $dir &&	run createrepo --checksum sha $dir
    done;

    run gpg --armor --export ${GPG_UID} > \
	${DESTINATION}${distribution}/RPM-GPG-KEY-${GPG_KEY_NAME};
done<commit_msg>Revert "Add workaround for CentOS 5 :<"<commit_after>#!/bin/sh

script_base_dir=`dirname $0`

if [ $# != 4 ]; then
    echo "Usage: $0 GPG_UID GPG_KEY_NAME DESTINATION DISTRIBUTIONS"
    echo " e.g.: $0 1BD22CD1 mitler-manager repositories/ 'fedora centos'"
    exit 1
fi

GPG_UID=$1
GPG_KEY_NAME=$2
DESTINATION=$3
DISTRIBUTIONS=$4

run()
{
    "$@"
    if test $? -ne 0; then
	echo "Failed $@"
	exit 1
    fi
}

for distribution in ${DISTRIBUTIONS}; do
    for dir in ${DESTINATION}${distribution}/*/*; do
	test -d $dir &&	run createrepo $dir
    done;

    run gpg --armor --export ${GPG_UID} > \
	${DESTINATION}${distribution}/RPM-GPG-KEY-${GPG_KEY_NAME};
done
{'fraction_non_alphanumeric': 0.1524822695035461, 'fraction_numerical': 0.023404255319148935, 'mean_word_length': 3.4651898734177213, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '2743036', 'n_tokens_mistral': 604, 'n_tokens_neox': 565, 'n_words': 150}