diff --git a/processor b/processor index 74bba7f..2f1b6b7 100755 --- a/processor +++ b/processor @@ -26,6 +26,10 @@ path_out="${2?Missing output path}" # provide default message formatter if necessary msgfmt="${msgfmt:-./msgfmt}" +# default template path (the former is exported so that templates themselves may +# make use of default templates) +export path_default_tpl=./tpl +path_tpl="${path_tpl:-$path_default_tpl}" # output XHTML5 header cat < "$path_out/$pagefile" \ && ./hashcache "$hash" "$pagefile" done diff --git a/repo2html b/repo2html index 16ec4f3..2c79d87 100755 --- a/repo2html +++ b/repo2html @@ -67,7 +67,7 @@ cwarn() # configuration (note that this setup in conjunction with the below defaults # imply that they can be passed in as environment variables as an alternative to # options) -while getopts t:d:c:l:f:R: opt; do +while getopts t:d:c:l:f:R:T: opt; do case "$opt" in t) title="$OPTARG";; d) desc="$OPTARG";; @@ -75,6 +75,7 @@ while getopts t:d:c:l:f:R: opt; do l) license="$OPTARG";; f) msgfmt="$OPTARG";; R) rss_count="$OPTARG";; + T) path_tpl="$OPTARG";; ?) exit 64;; esac done @@ -96,7 +97,7 @@ license="${license:-$( cwarn license )}" msgfmt="${msgfmt:-./msgfmt}" # make configuration available to all scripts -export title desc copyright license msgfmt url_root +export title desc copyright license msgfmt url_root path_tpl # clear the cachefile (TODO: we could maintain cache files from previous runs if # we offer a flag that opts out of reprocessing previously processed commits) diff --git a/tpl/commit.sh b/tpl/commit similarity index 100% rename from tpl/commit.sh rename to tpl/commit