#!/bin/bash

cmd=${1}

if [[ ${cmd} == "configure" && ! -d "build/" ]]; then
	mkdir build && cd build && cmake ..  -DCMAKE_BUILD_TYPE=Release
elif [[ ${cmd} == "configure" ]]; then
	cd build && rm -rf * && cmake .. -DCMAKE_BUILD_TYPE=Release
elif [[ ${cmd} == "build" ]]; then
	cd build && make
fi