#!/bin/sh top_dir=`pwd` shared_dir=`pwd`/../shared source_dir=`pwd`/xml-source processing_dir=`pwd`/processing output_dir=`pwd`/build fop_dir="$shared_dir/fop" export CLASSPATH=$CLASSPATH:$shared_dir:$fop_dir/build/fop.jar:$fop_dir/lib if [ ! -d $output_dir ]; then mkdir $output_dir fi langs="en es ru fr" manuals="Paper User Develop Install" if [ "$1" != "" ]; then cmd=$1 else echo -e "choose a manual to work with: \n 'all' for all the manuals\n 'u' for the User's Guide\n 'd' for the Developer's Guide\n 'i' for the Installer's Guide\n 'p' for From Paper to Collection" read cmd fi if [ $cmd = 'u' ]; then manuals="User" fi if [ $cmd = 'd' ]; then manuals="Develop" fi if [ $cmd = 'i' ]; then manuals="Install" fi if [ $cmd = 'p' ]; then manuals="Paper" fi if [ "$2" != "" ]; then langs=$2 else echo -e "choose a language to work with: \n all, en, fr, es, or ru" read cmd if [ $cmd != 'all' ]; then langs=$cmd fi fi for l in $langs; do if [ ! -d $output_dir/$l ]; then mkdir $output_dir/$l fi if [ ! -d $output_dir/$l/pdf ]; then mkdir $output_dir/$l/pdf fi for m in $manuals; do echo -e "\nprocessing the $m manual in $l" $fop_dir/fop.sh -c $shared_dir/fop/conf/userconfig.xml -q -xsl $processing_dir/xml-to-pdf.xsl -xml $source_dir/$l/"$m"_"$l".xml -pdf $output_dir/$l/pdf/"$m"_"$l".pdf echo -e "done!\n" done done