From 2b975b50174b5b232da46117982487104942759d Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 30 May 2006 07:26:46 +0000 Subject: [PATCH] Added script to regenerate html online help git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3555 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gen_online_help.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 gen_online_help.sh diff --git a/gen_online_help.sh b/gen_online_help.sh new file mode 100755 index 000000000..17ea91ffc --- /dev/null +++ b/gen_online_help.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# Defaults for Debian +CNV=latex2html +LYX=lyx-qt + +# Sanity checks +if [ ! -d doc/guide/user ]; then + echo "Can't find usable documentation structure - aborting" + exit 1 +fi + +# Commands present? +for cmd in $CNV $LYX; do + if ! which $cmd &> /dev/null; then + echo "Can't find executable for '$cmd' - aborting" + exit 2 + fi +done + +pushd . &> /dev/null +cd doc/guide/user + +for lang in *; do + [ ! -d "$lang" ] && continue + + pushd . &> /dev/null + echo -n "Processing language $lang..." + cd $lang/lyx-source + + for source in *.lyx; do + $LYX -e latex $source; d=../html/${source%%\.*}/ + [ -d $d ] || mkdir -p $d && rm -r $d/* + $CNV -no_navigation -dir $d ${source%%\.*}.tex + done + + popd &> /dev/null +done + +popd &> /dev/null + +exit 0 -- 2.30.2