Code

Added script to regenerate html online help
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 May 2006 07:26:46 +0000 (07:26 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 May 2006 07:26:46 +0000 (07:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3555 594d385d-05f5-0310-b6e9-bd551577e9d8

gen_online_help.sh [new file with mode: 0755]

diff --git a/gen_online_help.sh b/gen_online_help.sh
new file mode 100755 (executable)
index 0000000..17ea91f
--- /dev/null
@@ -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