Revision: d3fbccf9cb18
Author:   Jean Deruelle <[email protected]>
Date:     Thu Jul  5 03:18:10 2012
Log:      fixing failing compilation of docs on telscale

http://code.google.com/p/jain-sip/source/detail?r=d3fbccf9cb18&repo=docs

Added:
 /sources-telscale/Makefile
 /sources-telscale/mkbk
 /sources-telscale/publican.cfg

=======================================
--- /dev/null
+++ /sources-telscale/Makefile  Thu Jul  5 03:18:10 2012
@@ -0,0 +1,26 @@
+#Makefile for Platform_User_Guide
+
+XML_LANG       = en-US
+# DOCNAME      = Platform_User_Guide
+# PRODUCT      = FIX_ME!
+BRAND          = JBoss
+# DOC_TYPE     = Set
+
+# Uncomment below 3 lines for a Distributed Set
+#BOOKS = Platform_Installation_Guide JAIN_SLEE_Server_User_Guide
+#BOOKS = Platform_Installation_Guide JAIN_SLEE_Server_User_Guide SIP_Servlets_Server_User_Guide Media_Server_User_Guide SIP_Presence_Service_User_Guide +#SET_REPO = https://svn.devel.redhat.com/repos/ecs/JBoss_Communications_Platform/1.2.0/
+#SET_REPO_TYPE = SVN
+
+#OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW
+
+# Extra Parameters start here
+
+# Extra Parameters stop here
+COMMON_CONFIG  = /usr/share/publican
+include $(COMMON_CONFIG)/make/Makefile.common
+
+# Uncomment below 2 lines for a Distributed Set
+#pre:: get_books set_books
+#clean:: clean_set_books
+
=======================================
--- /dev/null
+++ /sources-telscale/mkbk      Thu Jul  5 03:18:10 2012
@@ -0,0 +1,144 @@
+#! /usr/bin/env bash
+# :mode=shellscript:
+
+# short script for building Mobicents docs and ensuring
+# necessary files for JDocBook (all-*) are updated
+# for usage, call ./build_docs.bash without any arguments
+
+# EXAMPLES:
+
+# mkbk test
+# ...means: run xmllint on all books, looking for the first that does not build
+
+#   make CONDITION="mob" html-single-en-US
+#       BECOMES
+#   mkbk jss mob html-single-en-US
+
+#   make CONDITION="jbcp" html-single-en-US
+#       BECOMES
+#   mkbk jss jbcp html-single-en-US
+
+# JDocBook Reference (ignore this):
+# mvn compile -Denv.DOCNAME="SIP_Servlets_Server_User_Guide" -Phtml_single
+
+echo "Arg 1 [\$BK] (codename of book OR simply 'test'): $1"; BK=$(echo $1 | tr '[:upper:]' '[:lower:]') +echo "Arg 2 [\$COND] (CONDITION): $2"; COND=$(echo $2 | tr '[:upper:]' '[:lower:]') +echo -n "Arg 3 (pass-through arg; 3rd arg to 'make', if exists): "; THIRD="$3"; echo $THIRD +echo -n "Arg 4 (pass-through arg; 4th arg to 'make', if exists): "; FOURTH="$4"; echo $FOURTH +echo -n "Arg 5 (pass-through arg; 5th arg to 'make', if exists): "; FIFTH="$5"; echo $FIFTH
+echo "-------------------------------------------------"
+
+pre="[MKBK] "
+
+ALL_BKS="jss ms sss sps pig plat"
+ALL_CONDS="mob jbcp"
+
+PLAT="Platform_User_Guide"
+PIG="Platform_Installation_Guide"
+JSS="JAIN_SLEE_Server_User_Guide"
+MS="Media_Server_User_Guide"
+SSS="SIP_Servlets_Server_User_Guide"
+SPS="SIP_Presence_Service_User_Guide"
+
+set_docname() {
+       case $BK in
+               "plat") DOCNAME="$PLAT";;
+               "pig" ) DOCNAME="$PIG";;
+               "jss" ) DOCNAME="$JSS";;
+               "ms" ) DOCNAME="$MS";;
+               "sss") DOCNAME="$SSS";;
+               "sps") DOCNAME="$SPS";;
+       esac
+}
+
+test() {
+       for bk in "jss" "ms" "sss" "sps" "pig" "plat" # $PLAT $PIG $JSS $MS $SPS
+       do
+               BK=$bk
+               set_docname
+               cmd = "mkbk $bk jbcp xml-en-US &>/dev/null"
+
+               echo -n "$pre"; echo "DOCNAME is $DOCNAME"
+               echo -n "$pre"; echo "Calling:"; echo ""
+               echo -n "$pre"; echo "   $cmd"
+
+               eval $cmd
+
+               if [  $? -ne 0 ]; then
+                       echo -n "$pre"; echo "$bk is failing to build! Run!"
+                       exit 1
+               else
+                       echo -n "$pre"; echo "$DOCNAME builds correctly."
+                       echo -n "$pre"; echo "*****************************"
+               fi
+       done
+       echo -n "$pre"; echo "All books build correctly. Throw a party!"
+       exit 0
+}
+
+rm_tmp() {
+       if [[ -e Makefile ]]; then
+               if [[ -e pom.xml ]]; then
+                       if [[ -e tmp ]]; then
+                               echo -n "$pre"; echo "Removing 'tmp'..."
+                               rm tmp -fr
+                       fi
+               fi
+       fi
+}
+
+build_bk() {
+       rm_tmp
+       set_docname
+       cmd="make DOCNAME=$DOCNAME CONDITION=$COND $THIRD $FOURTH $FIFTH"
+       echo -n "$pre"; echo "DOCNAME is '$DOCNAME'"
+       echo -n "$pre"; echo "Calling:"; echo ""
+       echo -n "$pre"; echo "   $cmd"
+       eval $cmd
+
+       if [ $? -ne 0 ]; then
+               echo -n "$pre"; echo "$DOCNAME did not build!"
+               exit 1
+       else
+               if [ "$COND" = "mob" ]; then
+                       echo -n "$pre"; echo "Removing 
'en-US/all-$DOCNAME.xml'..."
+                       rm "en-US/all-$DOCNAME.xml"
+ echo -n "$pre"; echo "Copying 'tmp/en-US/xml/$DOCNAME.xml' to 'en-US/all-$DOCNAME.xml'..." + xmllint --postvalid --noent --xinclude "tmp/en-US/xml/$DOCNAME.xml"
"en-US/all-$DOCNAME.xml"
+               fi
+               echo -n "$pre"; echo "$DOCNAME built. Exiting successfully."
+               exit 0
+       fi
+}
+
+# TEST ARGUMENTS
+chk_BK_arg() {
+       if [ "$BK" = "" ]; then
+               echo -n "$pre"; echo "***************************************"
+ echo -n "$pre"; echo "Error: the BK argument must either represent a book or be 'test'" + echo -n "$pre"; echo " A possible argument for the BK OPTION is one of : $ALL_BKS"
+               echo -n "$pre"; echo "***************************************"
+               exit 1
+       fi
+}
+
+chk_COND_arg() {
+       if [ "$COND" != "mob" -a "$COND" != "jbcp" ]; then
+               echo -n "$pre"; echo "***************************************"
+ echo -n "$pre"; echo "Error: the second argument must be one of these conditions: $ALL_CONDS"
+               echo -n "$pre"; echo "***************************************"
+               exit 1
+       fi
+}
+
+dispatch() {
+       chk_BK_arg
+       if [ "$BK" = "test" ]; then
+               test
+       fi
+       chk_COND_arg
+
+       build_bk
+}
+
+dispatch
=======================================
--- /dev/null
+++ /sources-telscale/publican.cfg      Thu Jul  5 03:18:10 2012
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Thu Jan 27 14:23:54 2011
+
+debug: 1
+xml_lang: en-US
+brand: JBoss
+

Reply via email to