Skip to content

Commit 0f8a46c

Browse files
committed
tools: Allow setting the output format for the docs
1 parent 7753275 commit 0f8a46c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tools/build/build_docs.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,25 @@
1919
sourcedir=~/incubator-cloudstack/
2020
common_content_dir=/usr/share/publican/Common_Content
2121
publican_path=/usr/bin/publican
22+
output_format="html,pdf"
2223

2324
usage(){
2425
echo "usage: $0 [-s source dir] [-c publican common content] [-p path to publican]"
2526
echo " -s sets the source directory (defaults to $sourcedir)"
2627
echo " -c sets the public common content directory (defaults to $common_content_dir)"
2728
echo " -p sets the path to the publican binary (defaults to $publican_path)"
29+
echo " -f sets the output format (defaults to $output_format)"
2830
echo " -h"
2931
}
3032

31-
while getopts v:s:c:p:h opt
33+
while getopts v:s:c:p:f:h opt
3234
do
3335
case "$opt" in
3436
v) version="$OPTARG";;
3537
s) sourcedir="$OPTARG";;
3638
c) common_content_dir="$OPTARG";;
3739
p) publican_path="$OPTARG";;
40+
f) output_format="$OPTARG";;
3841
h) usage
3942
exit 0;;
4043
\?)
@@ -56,5 +59,5 @@ fi
5659
cd $sourcedir/docs
5760
cp -R /usr/share/publican/Common_Content .
5861
ln -s $sourcedir/docs/publican-cloudstack Common_Content/cloudstack
59-
publican build --config=publican-installation.cfg --formats html,pdf --langs en-US --common_content=$sourcedir/docs/Common_Content
62+
publican build --config=publican-installation.cfg --formats $output_format --langs en-US --common_content=$sourcedir/docs/Common_Content
6063
rm -r Common_Content

0 commit comments

Comments
 (0)