From: janw Date: Fri, 14 Mar 2008 09:47:11 +0000 (+0000) Subject: New Version. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1f3301d4ea65ee1c0861a24ae616f9350f458c0b;p=gosa.git New Version. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9811 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/update-online-help b/gosa-core/update-online-help index 73062f15d..1d24516b0 100755 --- a/gosa-core/update-online-help +++ b/gosa-core/update-online-help @@ -1,42 +1,133 @@ -#!/bin/sh +#!/bin/bash # Defaults for Debian CNV=`pwd`/contrib/latex2html -LYX=lyx-qt +LYX=lyx # Sanity checks -if [ ! -d doc/guide/user ]; then - echo "Can't find usable documentation structure - aborting" +if [ ! -d doc/core ]; then + echo "Can't find usable core documentation structure - aborting" exit 1 fi # Commands present? for cmd in $CNV $LYX; do - if ! which $cmd &> /dev/null; then + if [[ ! `which $cmd` ]]; then echo "Can't find executable for '$cmd' - aborting" exit 2 fi done +# Create guide.xml +cat << EOF > doc/guide.xml + + + + + + + +EOF + +echo -en "Generating doc/guide.xml..." +# core guide.xml +pushd . &> /dev/null +cd doc/core +cat < guide.xml >> ../guide.xml +popd &> /dev/null + +# plugins guide.xml pushd . &> /dev/null -cd doc/guide/user +if [ -d doc/plugins ]; then + cd doc/plugins + for plugin in *; do + [ -r $plugin/guide.xml ] && cat < $plugin/guide.xml >> ../guide.xml + done +fi +popd &> /dev/null +echo -en "\n" >> doc/guide.xml +sed -i "s~\t~ ~;s~\t~~g;" doc/guide.xml +echo -en " done.\n" + +# Core help +echo -en "Processing core\n" +pushd . &> /dev/null +cd doc/core for lang in *; do [ ! -d "$lang" ] && continue pushd . &> /dev/null - echo "Processing language $lang..." + echo -en "\tProcessing language $lang...\n" cd $lang/lyx-source - for source in *.lyx; do - $LYX -e latex $source; d=../html/${source%%\.*}/ > /dev/null + for source in $(find . -name \*.lyx -exec basename {} \;); do + echo -en "\t\tProcessing $source..." + echo -en " tex" + $LYX -e latex $source &> /dev/null + d=../html/${source%%\.*}/ [ -d $d ] || mkdir -p $d && rm -r $d/* &> /dev/null - $CNV -no_navigation -dir $d ${source%%\.*}.tex > /dev/null + echo -en " html" + $CNV -no_navigation -dir $d ${source%%\.*}.tex &> /dev/null + echo -en " cleanup" + rm images/*.eps &> /dev/null + rm ${source%%\.lyx}.tex &> /dev/null + echo -en " done.\n" + continue done - popd &> /dev/null done +popd &> /dev/null + +# Plugin help +pushd . &> /dev/null +if [ -d doc/plugins ]; then + cd doc/plugins + + for plugin in *; do + pushd . &> /dev/null + echo -en "Processing $plugin\n" + cd $plugin + for lang in *; do + [ ! -d "$lang" ] && continue + + pushd . &> /dev/null + echo -en "\tProcessing language $lang...\n" + cd $lang/lyx-source + + for source in $(find . -name \*.lyx -exec basename {} \;); do + echo -en "\t\tProcessing $source..." + echo -en " tex" + $LYX -e latex $source &> /dev/null + d=../html/${source%%\.*}/ + [ -d $d ] || mkdir -p $d && rm -r $d/* &> /dev/null + echo -en " html" + $CNV -no_navigation -dir $d ${source%%\.*}.tex &> /dev/null + echo -en " cleanup" + rm images/*.eps &> /dev/null + rm ${source%%\.lyx}.tex &> /dev/null + echo -en " done.\n" + continue + done + popd &> /dev/null + done + popd &> /dev/null + done + +fi popd &> /dev/null echo exit 0