diff options
author | Shaun McCance <shaunm@gnome.org> | 2011-02-02 09:33:05 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2011-02-02 09:33:05 -0500 |
commit | 85d0b796aec97a4d84cb8cc82869839cadf0109b (patch) | |
tree | 5b243c1c80a9adf1226f07857020d7b84ab8bfc4 | |
parent | 319f5e3580363d0b6f6dc389b40172f52b31bc10 (diff) | |
download | yelp-tools-85d0b796aec97a4d84cb8cc82869839cadf0109b.tar.gz |
tools/yelp-build.in: Added -x for XSLT customizations
-rwxr-xr-x | tools/yelp-build.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/yelp-build.in b/tools/yelp-build.in index 444629b..99dbee5 100755 --- a/tools/yelp-build.in +++ b/tools/yelp-build.in @@ -109,6 +109,7 @@ yelp_usage_html () { echo "" echo "Options:" echo " -o OUT Output files in the directory OUT" + echo " -x CUSTOM Import the custom XSLT file CUSTOM" ) 1>&2 } @@ -158,6 +159,9 @@ yelp_cache () { } yelp_html_xsl_common () { + if [ "x$html_custom" != "x" ]; then + echo '<xsl:include href="file://'`urlencode "$html_custom"`'"/>' + fi echo '<xsl:variable name="yelp.locale">' echo ' <xsl:choose>' echo ' <xsl:when test="$l10n.locale != '"''"'">' @@ -436,6 +440,11 @@ yelp_html () { html_out="$1" shift ;; + "-x") + shift + html_custom="$1" + shift + ;; *) break ;; @@ -446,6 +455,11 @@ yelp_html () { exit 1 fi html_out=`(cd "$html_out" && pwd)` + if [ "x$html_custom" != "x" ]; then + html_custom_dir=`dirname "$html_custom"` + html_custom_dir=`(cd "$html_custom_dir" && pwd)` + html_custom="$html_custom_dir"/`basename "$html_custom"` + fi if [ "$#" = "0" ]; then yelp_usage_html exit 1 |