tools: Allow setting the output format for the docs
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0f8a46c5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0f8a46c5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0f8a46c5 Branch: refs/heads/cisco-vnmc-api-integration Commit: 0f8a46c5802be6534d8d38cca3eb7b06568738ce Parents: 7753275 Author: Wido den Hollander <w...@widodh.nl> Authored: Fri Apr 12 15:07:24 2013 +0200 Committer: Wido den Hollander <w...@widodh.nl> Committed: Fri Apr 12 15:07:54 2013 +0200 ---------------------------------------------------------------------- tools/build/build_docs.sh | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0f8a46c5/tools/build/build_docs.sh ---------------------------------------------------------------------- diff --git a/tools/build/build_docs.sh b/tools/build/build_docs.sh index c1b1f13..62617a3 100755 --- a/tools/build/build_docs.sh +++ b/tools/build/build_docs.sh @@ -19,22 +19,25 @@ sourcedir=~/incubator-cloudstack/ common_content_dir=/usr/share/publican/Common_Content publican_path=/usr/bin/publican +output_format="html,pdf" usage(){ echo "usage: $0 [-s source dir] [-c publican common content] [-p path to publican]" echo " -s sets the source directory (defaults to $sourcedir)" echo " -c sets the public common content directory (defaults to $common_content_dir)" echo " -p sets the path to the publican binary (defaults to $publican_path)" + echo " -f sets the output format (defaults to $output_format)" echo " -h" } -while getopts v:s:c:p:h opt +while getopts v:s:c:p:f:h opt do case "$opt" in v) version="$OPTARG";; s) sourcedir="$OPTARG";; c) common_content_dir="$OPTARG";; p) publican_path="$OPTARG";; + f) output_format="$OPTARG";; h) usage exit 0;; \?) @@ -56,5 +59,5 @@ fi cd $sourcedir/docs cp -R /usr/share/publican/Common_Content . ln -s $sourcedir/docs/publican-cloudstack Common_Content/cloudstack -publican build --config=publican-installation.cfg --formats html,pdf --langs en-US --common_content=$sourcedir/docs/Common_Content +publican build --config=publican-installation.cfg --formats $output_format --langs en-US --common_content=$sourcedir/docs/Common_Content rm -r Common_Content \ No newline at end of file