<commit_before>#!/usr/bin/env bash

set -e
SELF_DIR="$(dirname $(readlink -f $0))"
cd "$SELF_DIR"

PREFIX="/usr"
CXXFLAGS="-std=c++11 -I ../include -fPIE -s -O3 -ldl"
CXX=g++
CP=cp

while [[ "$1"x != ""x ]]; do
    arg="$1"; shift
    case "$arg" in
        --prefix=* ) PREFIX="${arg##--prefix=}" ;;
        "--" ) break ;;
    esac
done

mkdir -p build
cd build
mkdir -p bin
$CXX $CXXFLAGS -DCONFIG_CS_HOME="\"$PREFIX/share/covscript\"" ../sources/standalone.cpp -o ./bin/cs &
$CXX $CXXFLAGS -DCONFIG_CS_HOME="\"$PREFIX/share/covscript\"" ../sources/repl.cpp -o ./bin/cs_repl &
wait

mkdir -p ./$PREFIX/{bin,share}
mkdir -p ./$PREFIX/share/covscript/imports
$CP ./bin/cs ./bin/cs_repl ./$PREFIX/bin<commit_msg>CI: Link libdl on Linux<commit_after>#!/usr/bin/env bash

set -e
SELF_DIR="$(dirname $(readlink -f $0))"
cd "$SELF_DIR"

PREFIX="/usr"
CXXFLAGS="-std=c++11 -I ../include -fPIE -s -O3 -ldl"
LDFLAGS="-ldl"
CXX=g++
CP=cp

while [[ "$1"x != ""x ]]; do
    arg="$1"; shift
    case "$arg" in
        --prefix=* ) PREFIX="${arg##--prefix=}" ;;
        "--" ) break ;;
    esac
done

mkdir -p build
cd build
mkdir -p bin
$CXX $CXXFLAGS -DCONFIG_CS_HOME="\"$PREFIX/share/covscript\"" \
    ../sources/standalone.cpp $LDFLAGS -o ./bin/cs &
$CXX $CXXFLAGS -DCONFIG_CS_HOME="\"$PREFIX/share/covscript\"" \
    ../sources/repl.cpp $LDFLAGS -o ./bin/cs_repl &
wait

mkdir -p ./$PREFIX/{bin,share}
mkdir -p ./$PREFIX/share/covscript/imports
$CP ./bin/cs ./bin/cs_repl ./$PREFIX/bin
{'fraction_non_alphanumeric': 0.22920892494929007, 'fraction_numerical': 0.008113590263691683, 'mean_word_length': 2.9466666666666668, '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': '6006757', 'n_tokens_mistral': 636, 'n_tokens_neox': 597, 'n_words': 136}