Code

dded a script to generate the pdf from the online manual
authoropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Jan 2007 10:26:26 +0000 (10:26 +0000)
committeropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Jan 2007 10:26:26 +0000 (10:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5608 594d385d-05f5-0310-b6e9-bd551577e9d8

gen_pdf_help.sh [new file with mode: 0755]

diff --git a/gen_pdf_help.sh b/gen_pdf_help.sh
new file mode 100755 (executable)
index 0000000..bd6bd65
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# Defaults for Debian
+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 $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 "Processing language $lang..."
+       cd $lang/lyx-source
+
+       for source in *.lyx; do
+               $LYX -e pdf $source; d=../pdf/${source%%\.*}/; pdf=${source%lyx}pdf > /dev/null
+               [ -d $d ] || mkdir -p $d && cp $pdf ../pdf/${source%%\.*}/ >/dev/null
+       done
+
+       popd &> /dev/null
+done
+
+popd &> /dev/null
+echo
+exit 0