<commit_before>#!/bin/sh

set -e

static_result_dir=src/static

FIX_COMP=""
if [ x"$(uname)" == x"Darwin" ]; then
  FIX_COMP="CC=/usr/bin/clang CXX=/usr/bin/clang++"
fi

echo "make clean && make for libpacparser (omitting test execution)..."
[ -d $static_result_dir ] && rm -fR $static_result_dir
make -C src clean
make $FIX_COMP CVMFS_BASE_C_FLAGS="$CVMFS_BASE_C_FLAGS" -j1 -C src pacparser.o libjs.a # default target runs tests!
echo "finished internal build of libpacparser"

echo "creating static link library for libpacparser..."
mkdir src/static
cp src/pacparser.o src/libjs.a $static_result_dir

cd $static_result_dir
ar x libjs.a
rm -f libjs.a
ar rsc libpacparser.a *.o
rm -f *.o
echo "finished creating static link library for libpacparser"

echo "stripping debug symbols for libpacparser..."
strip -S libpacparser.a
echo "finished building libpacparser.a"

# Install
cd ../../
cp -v src/*.h $EXTERNALS_INSTALL_LOCATION/include/
cp -v $static_result_dir/libpacparser.a $EXTERNALS_INSTALL_LOCATION/lib/
<commit_msg>Fix syntax error in pacparser makeHook.sh script<commit_after>#!/bin/sh

set -e

static_result_dir=src/static

FIX_COMP=""
if [ x"$(uname)" = x"Darwin" ]; then
  FIX_COMP="CC=/usr/bin/clang CXX=/usr/bin/clang++"
fi

echo "make clean && make for libpacparser (omitting test execution)..."
[ -d $static_result_dir ] && rm -fR $static_result_dir
make -C src clean
make $FIX_COMP CVMFS_BASE_C_FLAGS="$CVMFS_BASE_C_FLAGS" -j1 -C src pacparser.o libjs.a # default target runs tests!
echo "finished internal build of libpacparser"

echo "creating static link library for libpacparser..."
mkdir src/static
cp src/pacparser.o src/libjs.a $static_result_dir

cd $static_result_dir
ar x libjs.a
rm -f libjs.a
ar rsc libpacparser.a *.o
rm -f *.o
echo "finished creating static link library for libpacparser"

echo "stripping debug symbols for libpacparser..."
strip -S libpacparser.a
echo "finished building libpacparser.a"

# Install
cd ../../
cp -v src/*.h $EXTERNALS_INSTALL_LOCATION/include/
cp -v $static_result_dir/libpacparser.a $EXTERNALS_INSTALL_LOCATION/lib/

{'fraction_non_alphanumeric': 0.11826923076923077, 'fraction_numerical': 0.0009615384615384616, 'mean_word_length': 4.534574468085107, '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': '5306462', 'n_tokens_mistral': 781, 'n_tokens_neox': 742, 'n_words': 220}