<commit_before>#!/bin/bash
# $Id$

# Shell script building HopsaGUI dependency Discount automatically

basedir=`pwd`
name=discount
codedir=${basedir}/${name}-code
builddir=${basedir}/${name}-build
installdir=${basedir}/${name}

# Download and verify
./download-dependencies.py ${name}

# Copy code to build dir, not sure if out-of-source build is possible
mkdir -p $builddir
pushd $builddir
cp -a $codedir/* .

# Generate makefiles
chmod u+x ./configure.sh
./configure.sh --shared --prefix=$installdir --confdir=$installdir/etc
# Fix non-root ldconfig cache file location (permission) problem
sed -e 's/ldconfig "$1"/ldconfig -C .\/ld.so.cache "$1"/' -i librarian.sh

# Build
make -j$(getconf _NPROCESSORS_ONLN) -w

# Install
make install

popd
echo "setupDiscount.sh done!"<commit_msg>Enforce one core for non-windows libmarkdown build<commit_after>#!/bin/bash
# $Id$

# Shell script building HopsaGUI dependency Discount automatically

basedir=`pwd`
name=discount
codedir=${basedir}/${name}-code
builddir=${basedir}/${name}-build
installdir=${basedir}/${name}

# Download and verify
./download-dependencies.py ${name}

# Copy code to build dir, not sure if out-of-source build is possible
mkdir -p $builddir
pushd $builddir
cp -a $codedir/* .

# Generate makefiles
chmod u+x ./configure.sh
./configure.sh --shared --prefix=$installdir --confdir=$installdir/etc
# Fix non-root ldconfig cache file location (permission) problem
sed -e 's/ldconfig "$1"/ldconfig -C .\/ld.so.cache "$1"/' -i librarian.sh

# Build
make -j1

# Install
make install

popd
echo "setupDiscount.sh done!"
{'fraction_non_alphanumeric': 0.14376187460417986, 'fraction_numerical': 0.0031665611146295125, 'mean_word_length': 4.58303886925795, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6692607', 'n_tokens_mistral': 556, 'n_tokens_neox': 533, 'n_words': 157}