#!/bin/bash

set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

bdir="${DIR}/build"

mkdir -p "${bdir}"
for f in "$DIR"/*.adoc; do
    bn=$(basename "$f")
    ofbn="${bn%%.adoc}.html"
    asciidoctor "$f" -o "${bdir}/${ofbn}"
done

