#!/bin/bash

sudo apt install -y nlohmann-json3-dev wget curl cmake ninja-build

if [ ! -f /usr/local/lib/libassert.a ]; then
    git clone https://github.com/jeremy-rifkin/libassert.git
    git checkout v2.1.5
    mkdir libassert/build
    cd libassert/build
    cmake .. -DCMAKE_BUILD_TYPE=Release
    make -j
    sudo make install
    cd ../..
    rm -rf libassert
fi

if [ ! -f /usr/local/include/httplib.h ]; then
    sudo wget -q https://raw.githubusercontent.com/yhirose/cpp-httplib/master/httplib.h \
        -O /usr/local/include/httplib.h
fi
