#!/bin/bash

# Copyright (c) 2015 Christian Jaeger, copying@christianjaeger.ch
# This is free software. See the file COPYING.md that came bundled
# with this file.

set -eu

mydir=`dirname "$0"`

cd "$mydir"

inbase=".."
outbase="www"
configpath="./gen-config.pl"

# to make work without Sub::Call::Tail for t/htmlgen:
if [ "${HTMLGEN_-}" == 1 ]; then
    prefix="."
else
    prefix=""
fi

"../${prefix}htmlgen/gen" "$configpath" "$inbase" "$outbase" "$@"
