<commit_before>#!/bin/bash

set -u

# install packages
sudo apt-add-repository --yes ppa:mapnik/boost # boost 1.49 (in future 1.55)
sudo apt-get -qq update
sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev libboost-iostreams-dev libboost-regex-dev libboost-system-dev libboost-thread-dev
sudo apt-get install -y build-essential git cmake libprotoc-dev libprotobuf7 protobuf-compiler libprotobuf-dev libbz2-dev libstxxl-dev libstxxl-doc libstxxl1 libxml2-dev libzip-dev lua5.1 liblua5.1-0-dev

# install luabind
git clone https://github.com/DennisOSRM/luabind.git
cd luabind
mkdir -p build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make
sudo make install
cd ../../

# install osmpbf
git clone https://github.com/scrosby/OSM-binary.git
cd OSM-binary/src
make
sudo make install
cd ../../

# install OSRM
git clone https://github.com/DennisOSRM/Project-OSRM.git Project-OSRM -b develop
cd Project-OSRM
mkdir -p build 
cd build
cmake ../ -DWITH_TOOLS=1
make
sudo make install
cd ../../
pkg-config libosrm --cflags
pkg-config libosrm --libs
pkg-config libosrm --libs --static
cat /usr/local/lib/pkgconfig/*
<commit_msg>adapt the shared lib build to osx<commit_after>#!/bin/bash

set -u

UNAME=$(uname -s);
if [ ${UNAME} = 'Darwin' ]; then
    brew install boost cmake protobuf libstxxl lua luabind osm-pbf
else
    # install packages
    sudo apt-add-repository --yes ppa:mapnik/boost # boost 1.49 (in future 1.55)
    sudo apt-get -qq update
    sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev libboost-iostreams-dev libboost-regex-dev libboost-system-dev libboost-thread-dev
    sudo apt-get install -y build-essential git cmake libprotoc-dev libprotobuf7 protobuf-compiler libprotobuf-dev libbz2-dev libstxxl-dev libstxxl-doc libstxxl1 libxml2-dev libzip-dev lua5.1 liblua5.1-0-dev

    # install luabind
    git clone https://github.com/DennisOSRM/luabind.git
    cd luabind
    mkdir -p build
    cd build
    cmake ../ -DCMAKE_BUILD_TYPE=Release
    make
    sudo make install
    cd ../../

    # install osmpbf
    git clone https://github.com/scrosby/OSM-binary.git
    cd OSM-binary/src
    make
    sudo make install
    cd ../../

fi

# install OSRM
git clone https://github.com/DennisOSRM/Project-OSRM.git Project-OSRM -b develop
cd Project-OSRM
mkdir -p build 
cd build
cmake ../ -DWITH_TOOLS=1
make
sudo make install
cd ../../
pkg-config libosrm --cflags
pkg-config libosrm --libs
pkg-config libosrm --libs --static
cat /usr/local/lib/pkgconfig/*

{'fraction_non_alphanumeric': 0.10969793322734499, 'fraction_numerical': 0.012718600953895072, 'mean_word_length': 3.251689189189189, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4293009', 'n_tokens_mistral': 933, 'n_tokens_neox': 872, 'n_words': 247}