From f11b3ecdee83ca909aedcbfa066bd446143460a4 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 19 May 2013 17:06:53 -0400 Subject: [PATCH] Added external css configuration var and -C option --- repo2html | 5 +++-- tpl/commit | 4 ++++ tpl/index | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/repo2html b/repo2html index e4eca5a..b7b116b 100755 --- a/repo2html +++ b/repo2html @@ -67,13 +67,14 @@ 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:T: opt; do +while getopts t:d:c:l:f:C:R:T: opt; do case "$opt" in t) title="$OPTARG";; d) desc="$OPTARG";; c) copyright="$OPTARG";; l) license="$OPTARG";; f) msgfmt="$OPTARG";; + C) html_external_css="$OPTARG";; R) rss_count="$OPTARG";; T) path_tpl="$OPTARG";; ?) exit 64;; @@ -97,7 +98,7 @@ license="${license:-$( cwarn license )}" msgfmt="${msgfmt:-./msgfmt}" # make configuration available to all scripts -export title desc copyright license msgfmt url_root path_tpl +export title desc copyright license msgfmt url_root path_tpl html_external_css # 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 b/tpl/commit index f2af52c..6115f35 100755 --- a/tpl/commit +++ b/tpl/commit @@ -4,6 +4,10 @@ cat < $subject + $( [ -n "$html_external_css" ] \ + && printf '' \ + "$html_external_css" + )