1#!/bin/sh
2# Executable wrapper script
3# Ensures the program is up-to-date, then hands over
4
5set -e
6cd "$(dirname "$0")"
7PROGRAM_NAME="$(basename "$0")"
8
9# Create build directory
10[ -d build ] || mkdir build
11
12# Generate build files
13[ -f build/CMakeCache.txt ] || ./bootstrap
14
15# Generate binaries
16# Users of GNU Make can enable parallel builds on N cores by setting
17# MAKEFLAGS=-jN when calling this script.
18cmake --build build
19
20# Run main binary
21exec build/$PROGRAM_NAME "$@"
22