[18741] | 1 | #!/bin/bash
|
---|
[13632] | 2 |
|
---|
[13782] | 3 | top_dir=`pwd`
|
---|
| 4 | shared_dir=`pwd`/../shared
|
---|
| 5 | source_dir=`pwd`/xml-source
|
---|
| 6 | processing_dir=`pwd`/processing
|
---|
| 7 | output_dir=`pwd`/build
|
---|
| 8 | fop_dir="$shared_dir/fop"
|
---|
| 9 | export CLASSPATH=$CLASSPATH:$shared_dir:$fop_dir/build/fop.jar:$fop_dir/lib
|
---|
[13632] | 10 |
|
---|
[13782] | 11 | if [ ! -d $output_dir ]; then
|
---|
| 12 | mkdir $output_dir
|
---|
[13632] | 13 | fi
|
---|
| 14 |
|
---|
[18741] | 15 | #sus out what manuals to build
|
---|
| 16 | all_manuals="Paper User Develop Install"
|
---|
| 17 | if [ "$1" == "all" ]; then
|
---|
| 18 | manuals=$all_manuals
|
---|
| 19 | elif [ "$1" != "" ]; then
|
---|
| 20 | manuals=$1
|
---|
[14606] | 21 | else
|
---|
[18741] | 22 | echo "choose a manual to work with:"
|
---|
| 23 | echo "'all' for all the manuals"
|
---|
| 24 | echo "'User' for the User's Guide"
|
---|
| 25 | echo "'Develop' for the Developer's Guide"
|
---|
| 26 | echo "'Install' for the Installer's Guide"
|
---|
| 27 | echo "'Paper' for From Paper to Collection"
|
---|
| 28 | echo -n "> "
|
---|
| 29 | read manuals
|
---|
| 30 | if [ "$manuals" == "all" ]; then
|
---|
| 31 | manuals=$all_manuals
|
---|
| 32 | fi
|
---|
[14606] | 33 | fi
|
---|
[13881] | 34 |
|
---|
[18741] | 35 | #sus out what languages to build in
|
---|
| 36 | all_langs="en es ru fr ar"
|
---|
| 37 | if [ "$2" == "all" ]; then
|
---|
| 38 | langs=$all_langs
|
---|
[13881] | 39 |
|
---|
[18741] | 40 | elif [ "$2" != "" ]; then
|
---|
[14606] | 41 | langs=$2
|
---|
| 42 | else
|
---|
[18741] | 43 | echo "choose a language to work with out of: $all_langs"
|
---|
| 44 | echo "choose 'all' for all languages"
|
---|
| 45 | echo -n "> "
|
---|
| 46 | read langs
|
---|
| 47 | if [ "$langs" == "all" ]; then
|
---|
| 48 | langs=$all_langs
|
---|
[14606] | 49 | fi
|
---|
[13881] | 50 | fi
|
---|
| 51 |
|
---|
[18741] | 52 | echo "Manuals: $manuals"
|
---|
| 53 | echo "Languages: $langs"
|
---|
| 54 | echo
|
---|
| 55 |
|
---|
[13782] | 56 | for l in $langs; do
|
---|
[13881] | 57 |
|
---|
[13782] | 58 | if [ ! -d $output_dir/$l ]; then
|
---|
[13881] | 59 | mkdir $output_dir/$l
|
---|
[13864] | 60 | fi
|
---|
[13881] | 61 | if [ ! -d $output_dir/$l/pdf ]; then
|
---|
| 62 | mkdir $output_dir/$l/pdf
|
---|
| 63 | fi
|
---|
| 64 |
|
---|
| 65 | for m in $manuals; do
|
---|
[18741] | 66 | echo "Processing the $m manual in $l"
|
---|
[13864] | 67 | $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
|
---|
[18741] | 68 | echo "done"
|
---|
[13782] | 69 | done
|
---|
| 70 | done
|
---|