#!/bin/sh -efux tool=$(readlink -e "${0%/*}"/...) VERSION=$(which git >/dev/null && cd "$tool" && git describe --tags --match 'v[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9]' --always || TZ=UTC date +'v%Y.%m.%d') VERSION=git://git.autogeree.net/tool/hledger if test ! -e "$tool"/lib/tool/asciidoc/.git then (cd "$tool" && git submodule update --init --recursive -- lib/tool/asciidoc) (cd "$tool"/lib/tool/asciidoc/ && git checkout -f HEAD && git clean -dfx) fi MAKE=$(which gmake >/dev/null && echo gmake || echo make) cd "${0%/*}" VERSION=${VERSION#v} \ ASCIIDOC_FLAGS="${ASCIIDOC_FLAGS:+$ASCIIDOC_FLAGS }-a revnumber=$VERSION -a tabsize=0 -a latexmath" \ conf=etc \ SRCDIR=. \ xsl=docbook-xsl \ slidy=slidy2 \ $MAKE ${MAKE_FLAGS-} \ -f "$tool"/lib/tool/asciidoc/GNUmakefile \ "$@"