<commit_before>#!/bin/bash
# 2011/Jan/01 @ <NAME>
# Desc: check for new version of Slackware and add it
set -e
set -u

CFG="/srv/httpd/search.slackware.eu/conf/config.sh"

if [ ! -e "${CFG}" ]; then
	echo "Config file '${CFG}' not found."
	exit 254;
fi

source "${CFG}"

SVERSLIST=$(mktemp -p "${TMPDIR}")

wget -q "${LINK}/" -O "${SVERSLIST}" || \
	{
		echo "Unable to download list of Slackware versions.";
		rm -f "${SVERSLIST}";
		exit 1;
	}

for SVER in $(grep -e '<a href=' "${SVERSLIST}" | tr -s ' ' | \
	cut -d '>' -f 2- | cut -d '<' -f 1 | sed -e 's#\/##' | \
	grep -v -E -e '(-iso|unsupported|_source)'); do
	if [ "${SVER}" == "slackware-3.3" ] || [ "${SVER}" == "slackware-7.1" ]; then
		continue;
	fi
	perl "${SCRIPTDIR}/db-check-slackversion.pl" "${SVER}" && \
		sh "${SCRIPTDIR}/slackversion-add.sh" "${SVER}" || continue;
done

rm -f "${SVERSLIST}"
<commit_msg>FIX: check-slackvs ~ blacklist 'slackware'<commit_after>#!/bin/bash
# 2011/Jan/01 @ <NAME>
# Desc: check for new version of Slackware and add it
set -e
set -u

CFG="/srv/httpd/search.slackware.eu/conf/config.sh"

if [ ! -e "${CFG}" ]; then
	echo "Config file '${CFG}' not found."
	exit 254;
fi

source "${CFG}"

SVERSLIST=$(mktemp -p "${TMPDIR}")

wget -q "${LINK}/" -O "${SVERSLIST}" || \
	{
		echo "Unable to download list of Slackware versions.";
		rm -f "${SVERSLIST}";
		exit 1;
	}

for SVER in $(grep -e '<a href=' "${SVERSLIST}" | tr -s ' ' | \
	cut -d '>' -f 2- | cut -d '<' -f 1 | sed -e 's#\/##' | \
	grep -v -E -e '(-iso|unsupported|_source)'); do
	if [ "${SVER}" == "slackware-3.3" ] || \
		[ "${SVER}" == "slackware-7.1" ] || \
		[ "${SVER}" == "slackware" ]; then
		continue;
	fi
	perl "${SCRIPTDIR}/db-check-slackversion.pl" "${SVER}" && \
		sh "${SCRIPTDIR}/slackversion-add.sh" "${SVER}" || continue;
done

rm -f "${SVERSLIST}"

{'fraction_non_alphanumeric': 0.24601867105985722, 'fraction_numerical': 0.01757276221856123, 'mean_word_length': 3.1598173515981736, 'pattern_counts': {'":': 0, '<': 9, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1848454', 'n_tokens_mistral': 818, 'n_tokens_neox': 773, 'n_words': 205}