<commit_before>#!/bin/bash

ver=0.5

set -ex

rm -rf tmp.deb
mkdir -p tmp.deb

make distclean || true
./autogen.sh
./configure
make dist

cd tmp.deb
cp ../stoken-${ver}.tar.gz stoken_${ver}.orig.tar.gz
tar zxf stoken_${ver}.orig.tar.gz
cd stoken-${ver}
cp -a ../../debian .
debuild -us -uc

exit 0<commit_msg>build-debian.sh: Don't run "make dist"; other changes<commit_after>#!/bin/bash

set -ex

function build_one
{
	arg="$1"

	rm -rf tmp.deb
	mkdir tmp.deb
	pushd tmp.deb

	cp ../$tarball stoken_${ver}.orig.tar.gz
	tar zxf ../$tarball
	cd stoken-${ver}
	cp -a ../../debian .
	debuild "$arg"
	cd ..
	lintian -IE --pedantic *.changes >> ../lintian.txt || true
	popd
}

#
# MAIN
#

tarball=$(ls -1 stoken-*.tar.gz 2> /dev/null || true)
if [ -z "$tarball" -o ! -e "$tarball" ]; then
	echo "missing release tarball"
	exit 1
fi

ver=${tarball#*-}
ver=${ver%%.tar.gz}

rm -f lintian.txt
touch lintian.txt

build_one ""
echo "------------" >> lintian.txt
build_one "-S"

echo "lintian:"
cat lintian.txt

exit 0
{'fraction_non_alphanumeric': 0.2005958291956306, 'fraction_numerical': 0.007944389275074478, 'mean_word_length': 2.789473684210526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '6461449', 'n_tokens_mistral': 451, 'n_tokens_neox': 421, 'n_words': 113}