Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E354DDEC for ; Mon, 24 Sep 2012 17:29:57 +0000 (UTC) Received: (qmail 19037 invoked by uid 500); 24 Sep 2012 17:29:55 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 18952 invoked by uid 500); 24 Sep 2012 17:29:55 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 18528 invoked by uid 99); 24 Sep 2012 17:29:54 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 17:29:54 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3EBA7394A0; Mon, 24 Sep 2012 17:29:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: edison@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [9/20] git commit: docs: Add build script Message-Id: <20120924172954.3EBA7394A0@tyr.zones.apache.org> Date: Mon, 24 Sep 2012 17:29:54 +0000 (UTC) docs: Add build script There is currently no script to build the docs with, this is an easy script to build them. An example how I use it: $ cd ~wido/repos/cloudstack $ tools/build/build_docs.sh -s $(echo ~wido/repos/cloudstack) Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/4ab686f6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/4ab686f6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/4ab686f6 Branch: refs/heads/4.0 Commit: 4ab686f656af5273616778f5e95f03fc26dd86cc Parents: 9e8000f Author: Wido den Hollander Authored: Mon Sep 24 14:40:00 2012 +0200 Committer: Edison Su Committed: Mon Sep 24 10:23:25 2012 -0700 ---------------------------------------------------------------------- tools/build/build_docs.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4ab686f6/tools/build/build_docs.sh ---------------------------------------------------------------------- diff --git a/tools/build/build_docs.sh b/tools/build/build_docs.sh new file mode 100755 index 0000000..de57ff0 --- /dev/null +++ b/tools/build/build_docs.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +sourcedir=~/incubator-cloudstack/ +common_content_dir=/usr/share/publican/Common_Content +publican_path=/usr/bin/publican + +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 " -h" +} + +while getopts v:s:c:p:h opt +do + case "$opt" in + v) version="$OPTARG";; + s) sourcedir="$OPTARG";; + c) common_content_dir="$OPTARG";; + p) publican_path="$OPTARG";; + h) usage + exit 0;; + \?) + usage + exit 1;; + esac +done + +if [ ! -x "$publican_path" ]; then + echo "$publican_path doesn't seem like an executeable?" + exit 1 +fi + +cd $sourcedir/docs +cp -R /usr/share/publican/Common_Content . +ln -s $sourcedir/docs/publican-cloudstack Common_Content/cloudstack +publican build --config=publican-all.cfg --formats html,pdf --langs en-US --common_content=$sourcedir/docs/Common_Content +rm -r Common_Content \ No newline at end of file