Last change
on this file since 14606 was 14606, checked in by oranfry, 17 years ago |
making the generate-pdf.sh script work non-interactively, same as r:14593:14594
|
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.4 KB
|
Rev | Line | |
---|
[13632] | 1 | #!/bin/sh
|
---|
| 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 |
|
---|
[13864] | 15 | langs="en es ru fr"
|
---|
| 16 | manuals="Paper User Develop Install"
|
---|
[13647] | 17 |
|
---|
[14606] | 18 | if [ "$1" != "" ]; then
|
---|
| 19 | cmd=$1
|
---|
| 20 | else
|
---|
| 21 | 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"
|
---|
| 22 | read cmd
|
---|
| 23 | fi
|
---|
[13881] | 24 |
|
---|
| 25 | if [ $cmd = 'u' ]; then
|
---|
| 26 | manuals="User"
|
---|
| 27 | fi
|
---|
| 28 | if [ $cmd = 'd' ]; then
|
---|
| 29 | manuals="Develop"
|
---|
| 30 | fi
|
---|
| 31 | if [ $cmd = 'i' ]; then
|
---|
| 32 | manuals="Install"
|
---|
| 33 | fi
|
---|
| 34 | if [ $cmd = 'p' ]; then
|
---|
| 35 | manuals="Paper"
|
---|
| 36 | fi
|
---|
| 37 |
|
---|
| 38 |
|
---|
[14606] | 39 | if [ "$2" != "" ]; then
|
---|
| 40 | langs=$2
|
---|
| 41 | else
|
---|
| 42 | echo -e "choose a language to work with: \n all, en, fr, es, or ru"
|
---|
| 43 | read cmd
|
---|
| 44 | if [ $cmd != 'all' ]; then
|
---|
| 45 | langs=$cmd
|
---|
| 46 | fi
|
---|
[13881] | 47 | fi
|
---|
| 48 |
|
---|
[13782] | 49 | for l in $langs; do
|
---|
[13881] | 50 |
|
---|
[13782] | 51 | if [ ! -d $output_dir/$l ]; then
|
---|
[13881] | 52 | mkdir $output_dir/$l
|
---|
[13864] | 53 | fi
|
---|
[13881] | 54 | if [ ! -d $output_dir/$l/pdf ]; then
|
---|
| 55 | mkdir $output_dir/$l/pdf
|
---|
| 56 | fi
|
---|
| 57 |
|
---|
| 58 | for m in $manuals; do
|
---|
| 59 | echo -e "\nprocessing the $m manual in $l"
|
---|
[13864] | 60 | $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
|
---|
[13881] | 61 | echo -e "done!\n"
|
---|
[13782] | 62 | done
|
---|
| 63 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.