Skip to content

Commit c5b10a7

Browse files
committed
tools: Add option to specify publican configuration file for building the docs
1 parent 15c2619 commit c5b10a7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

tools/build/build_docs.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,27 @@ sourcedir=~/incubator-cloudstack/
2020
common_content_dir=/usr/share/publican/Common_Content
2121
publican_path=/usr/bin/publican
2222
output_format="html,pdf"
23+
config="publican-adminguide.cfg"
2324

2425
usage(){
2526
echo "usage: $0 [-s source dir] [-c publican common content] [-p path to publican]"
2627
echo " -s sets the source directory (defaults to $sourcedir)"
2728
echo " -c sets the public common content directory (defaults to $common_content_dir)"
2829
echo " -p sets the path to the publican binary (defaults to $publican_path)"
2930
echo " -f sets the output format (defaults to $output_format)"
30-
echo " -h"
31+
echo " -g sets the publican config file (defaults to $config)"
32+
echo " -h show this help"
3133
}
3234

33-
while getopts v:s:c:p:f:h opt
35+
while getopts v:s:c:p:f:g:h opt
3436
do
3537
case "$opt" in
3638
v) version="$OPTARG";;
3739
s) sourcedir="$OPTARG";;
3840
c) common_content_dir="$OPTARG";;
3941
p) publican_path="$OPTARG";;
4042
f) output_format="$OPTARG";;
43+
g) config="$OPTARG";;
4144
h) usage
4245
exit 0;;
4346
\?)
@@ -59,5 +62,5 @@ fi
5962
cd $sourcedir/docs
6063
cp -R /usr/share/publican/Common_Content .
6164
ln -s $sourcedir/docs/publican-cloudstack Common_Content/cloudstack
62-
publican build --config=publican-installation.cfg --formats $output_format --langs en-US --common_content=$sourcedir/docs/Common_Content
63-
rm -r Common_Content
65+
publican build --config=$config --formats $output_format --langs en-US --common_content=$sourcedir/docs/Common_Content
66+
rm -r Common_Content

0 commit comments

Comments
 (0)