Code

Removed old unused functions.
[gosa.git] / gen_online_help.sh
1 #!/bin/sh
3 # Defaults for Debian
4 CNV=`pwd`/contrib/latex2html
5 LYX=lyx-qt
7 # Sanity checks
8 if [ ! -d doc/guide/user ]; then
9         echo "Can't find usable documentation structure - aborting"
10         exit 1
11 fi
13 # Commands present?
14 for cmd in $CNV $LYX; do
15         if ! which $cmd &> /dev/null; then
16                 echo "Can't find executable for '$cmd' - aborting"
17                 exit 2
18         fi
19 done
21 pushd . &> /dev/null
22 cd doc/guide/user
24 for lang in *; do
25         [ ! -d "$lang" ] && continue
27         pushd . &> /dev/null
28         echo "Processing language $lang..."
29         cd $lang/lyx-source
31         for source in *.lyx; do
32                 $LYX -e latex $source; d=../html/${source%%\.*}/ > /dev/null
33                 [ -d $d ] || mkdir -p $d && rm -r $d/* &> /dev/null
34                 $CNV -no_navigation -dir $d ${source%%\.*}.tex > /dev/null
35         done
37         popd &> /dev/null
38 done
40 popd &> /dev/null
41 echo
42 exit 0