From: opensides Date: Wed, 24 Jan 2007 10:26:26 +0000 (+0000) Subject: dded a script to generate the pdf from the online manual X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c522b06153fffdc1835d9ca35ade53382fbd4503;p=gosa.git dded a script to generate the pdf from the online manual git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5608 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gen_pdf_help.sh b/gen_pdf_help.sh new file mode 100755 index 000000000..bd6bd65f1 --- /dev/null +++ b/gen_pdf_help.sh @@ -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