<commit_before>#!/bin/bash

set -x
set -v

#Remove .so
find . -name *.so | xargs rm

#For plugin test, compile Percolator plugin
cd plugins/percolator;
gcc -c percolator.c -Wall -Werror -fPIC -o percolator.o
gcc -shared -o libctrpercolator.so percolator.o -undefined dynamic_lookup
cd ..
cd ..
cp plugins/percolator/libctrpercolator.so mods/percolator/libctrpercolator.so

#request test
cd plugins/request/ccgi-1.2;
gcc -c ccgi.c -Wall	-Werror -fpic -o ccgi.o
gcc -c prefork.c -Wall -Werror -fpic -o prefork.o
cd ..
gcc -c request.c -Wall -Werror -fpic -o request.o
gcc -shared -o libctrrequest.so request.o ccgi-1.2/ccgi.o ccgi-1.2/prefork.o
cd ..
cd ..
cp plugins/request/libctrrequest.so mods/request/libctrrequest.so


make clean;<commit_msg>`-undefined dynamic_lookup` does not exist for gcc in Travis CI<commit_after>#!/bin/bash

set -x
set -v

OS=`uname -s`
#Remove .so
find . -name *.so | xargs rm

#For plugin test, compile Percolator plugin
cd plugins/percolator;
gcc -c percolator.c -Wall -Werror -fPIC -o percolator.o
LDFLAGS='-shared'
if [ $OS = "Darwin" ]; then
  LDFLAGS='-shared -undefined dynamic_lookup'
fi
gcc ${LDFLAGS} -o libctrpercolator.so percolator.o
cd ..
cd ..
cp plugins/percolator/libctrpercolator.so mods/percolator/libctrpercolator.so

#request test
cd plugins/request/ccgi-1.2;
gcc -c ccgi.c -Wall	-Werror -fpic -o ccgi.o
gcc -c prefork.c -Wall -Werror -fpic -o prefork.o
cd ..
gcc -c request.c -Wall -Werror -fpic -o request.o
gcc ${LDFLAGS} -o libctrrequest.so request.o ccgi-1.2/ccgi.o ccgi-1.2/prefork.o
cd ..
cd ..
cp plugins/request/libctrrequest.so mods/request/libctrrequest.so


make clean;
{'fraction_non_alphanumeric': 0.13120784794604537, 'fraction_numerical': 0.007357449417535254, 'mean_word_length': 3.3404255319148937, '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': '5344171', 'n_tokens_mistral': 674, 'n_tokens_neox': 651, 'n_words': 183}