From: opensides Date: Wed, 24 Jan 2007 10:24:12 +0000 (+0000) Subject: added a script to generate the pdf from the online manual X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c79e9f20056ebc7ee5872d2a072fc36bc5b097ca;p=gosa.git added a script to generate the pdf from the online manual git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5607 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