Ignore:
Timestamp:
2007-01-24T17:17:39+13:00 (15 years ago)
Author:
lh92
Message:

modified shell scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl-documentation/manuals/generate-pdf.sh

    r13647 r13782  
    11#!/bin/sh
    22
    3 gsdlhome=$GSDLHOME
    4 shared="../shared"
    5 export CLASSPATH=$CLASSPATH:$shared:$shared/fop/build/fop.jar:$shared/fop/lib
    6 fop="$shared/fop"
    7 processing="processing"
     3top_dir=`pwd`
     4shared_dir=`pwd`/../shared
     5source_dir=`pwd`/xml-source
     6processing_dir=`pwd`/processing
     7output_dir=`pwd`/build
     8fop_dir="$shared_dir/fop"
     9export CLASSPATH=$CLASSPATH:$shared_dir:$fop_dir/build/fop.jar:$fop_dir/lib
    810
    9 if [ "$gsdlhome" == "" ]; then
    10     # assume tutorials in a subdir of gsdl
    11       pushd .. > /dev/null
    12       gsdlhome=`pwd`
    13       popd > /dev/null
     11if [ ! -d $output_dir ]; then
     12  mkdir $output_dir
    1413fi
    1514
    16 if [ ! -d build ]; then
    17   mkdir build
    18 fi
     15langs="en " #fr es ru
     16manuals="Develop Install Paper" #User
    1917
    20 cd build
     18for l in $langs; do
     19    echo "Processing $l version"
     20    if [ ! -d $output_dir/$l ]; then         
     21        mkdir $output_dir/$l
     22      fi
     23    mkdir $output_dir/$l/pdf
     24   
     25    for m in $manuals; do                   
     26            $fop_dir/fop.sh -q -xsl $processing_dir/xml-to-pdf.xsl -xml $source_dir/$l/"$m"_"$l".xml -pdf $output_dir/$l/pdf/"$m"_"$l".pdf
     27    done
     28done
    2129
    22 echo "procesing english manuals"
    23 if [ ! -d en ]; then
    24     mkdir en
    25 fi
    26 cd en
    27 mkdir pdf
    28 
    29 #back to the manual directory
    30 cd ..
    31 cd ..
    32 
    33 pdf="build/en/pdf"
    34 #echo "User's manual (english)"
    35 #$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/User_en.xml -pdf $pdf/User_en.pdf
    36 echo "Developer's manual (english)"
    37 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/en/Develop_en.xml -pdf $pdf/Develop_en.pdf
    38 echo "Installer's manual (english)"
    39 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/en/Install_en.xml -pdf $pdf/Install_en.pdf
    40 echo "From Paper to Collection (english)"
    41 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/en/Paper_en.xml -pdf $pdf/Paper_en.pdf
    42 
    43 
    44 echo "procesing french manuals"
    45 cd build
    46 if [ ! -d fr ]; then
    47     mkdir fr
    48 fi
    49 cd fr
    50 mkdir pdf
    51 cd ..
    52 cd ..
    53 pdf="build/fr/pdf"
    54 
    55 #echo "User's manual (french)"
    56 #$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/fr/User_fr.xml -pdf $pdf/User_fr.pdf
    57 echo "Developer's manual (french)"
    58 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/fr/Develop_fr.xml -pdf $pdf/Develop_fr.pdf
    59 echo "Installer's manual (french)"
    60 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/fr/Install_fr.xml -pdf $pdf/Install_fr.pdf
    61 echo "From Paper to Collection (french)"
    62 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/fr/Paper_fr.xml -pdf $pdf/Paper_fr.pdf
    63 
    64 
    65 echo "procesing spanish manuals"
    66 cd build
    67 if [ ! -d es ]; then
    68     mkdir es
    69 fi
    70 cd es
    71 mkdir pdf
    72 cd ..
    73 cd ..
    74 pdf="build/es/pdf"
    75 
    76 #echo "User's manual (spanish)"
    77 #$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/es/User_es.xml -pdf $pdf/User_es.pdf
    78 echo "Developer's manual (spanish)"
    79 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/es/Develop_es.xml -pdf $pdf/Develop_es.pdf
    80 echo "Installer's manual (spanish)"
    81 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/es/Install_es.xml -pdf $pdf/Install_es.pdf
    82 echo "From Paper to Collection (spanish)"
    83 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/es/Paper_es.xml -pdf $pdf/Paper_es.pdf
    84 
    85 
    86 echo "procesing russian manuals"
    87 cd build
    88 if [ ! -d ru ]; then
    89     mkdir ru
    90 fi
    91 cd ru
    92 mkdir pdf
    93 cd ..
    94 cd ..
    95 pdf="build/ru/pdf"
    96 #echo "User's manual (russian)"
    97 #$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/ru/User_ru.xml -pdf $pdf/User_ru.pdf
    98 echo "Developer's manual (russian)"
    99 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/ru/Develop_ru.xml -pdf $pdf/Develop_ru.pdf
    100 echo "User's manual (russian)"
    101 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/ru/Install_ru.xml -pdf $pdf/Install_ru.pdf
    102 echo "From Paper to Collection (russian)"
    103 $fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/ru/Paper_ru.xml -pdf $pdf/Paper_ru.pdf
Note: See TracChangeset for help on using the changeset viewer.