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

address="https://github.com/IshitaTakeshi/PartsBasedDetector.git"

project_root=$(julia -e 'print(Pkg.dir("PartsBasedDetector"))')
deps_dir="$project_root/deps"
prefix="$deps_dir/usr"
src_dir="$deps_dir/src"

pbd_dir="$src_dir/pbd"
pbd_build_dir="$pbd_dir/build"

# cvmatio will be located as a subdirectory of $pbd_dir
cvmatio_dir="$pbd_dir/cvmatio"
cvmatio_build_dir="$cvmatio_dir/build"

if [ ! -d "$pbd_dir" ]; then
    mkdir -p $src_dir
    git clone $address --recursive $pbd_dir
fi

mkdir -p $cvmatio_build_dir
cd $cvmatio_build_dir
echo $cvmatio_dir
cmake -DCMAKE_INSTALL_PREFIX=$cvmatio_dir $cvmatio_dir
make -j4
make install

mkdir -p $pbd_build_dir
cd $pbd_build_dir
cmake $pbd_dir
make -j4
sudo make install

mkdir -p "$prefix/lib"
cp "$pbd_dir/lib/libPartsBasedDetector.so" "$prefix/lib"<commit_msg>Move the destination of libPartsBasedDetector.so to lib<commit_after>#!/usr/bin/env sh

address="https://github.com/IshitaTakeshi/PartsBasedDetector.git"

project_root=$(julia -e 'print(Pkg.dir("PartsBasedDetector"))')
deps_dir="$project_root/deps"
prefix="$deps_dir/usr"
src_dir="$deps_dir/src"

pbd_dir="$src_dir/pbd"
pbd_build_dir="$pbd_dir/build"

# cvmatio will be located as a subdirectory of $pbd_dir
cvmatio_dir="$pbd_dir/cvmatio"
cvmatio_build_dir="$cvmatio_dir/build"

if [ ! -d "$pbd_dir" ]; then
    mkdir -p $src_dir
    git clone $address --recursive $pbd_dir
fi

mkdir -p $cvmatio_build_dir
cd $cvmatio_build_dir
echo $cvmatio_dir
cmake -DCMAKE_INSTALL_PREFIX=$cvmatio_dir $cvmatio_dir
make -j4
make install

mkdir -p $pbd_build_dir
cd $pbd_build_dir
cmake $pbd_dir
make -j4
sudo make install

mkdir -p "$project_root/lib"
cp "$pbd_dir/lib/libPartsBasedDetector.so" "$project_root/lib"
{'fraction_non_alphanumeric': 0.12886597938144329, 'fraction_numerical': 0.002290950744558992, 'mean_word_length': 6.1016260162601625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6221329', 'n_tokens_mistral': 741, 'n_tokens_neox': 722, 'n_words': 139}