Changeset 13782


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

modified shell scripts

Location:
trunk/gsdl-documentation/manuals
Files:
2 edited

Legend:

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

    r13647 r13782  
    11#!/bin/sh
    22
    3 gsdlhome=$GSDLHOME
    4 shared="../../../shared"
    5 processing="../../processing"
    6 sources="../../xml-source"
    7 
    8 if [ "$gsdlhome" == "" ]; then
    9     # assume tutorials in a subdir of gsdl
    10       pushd .. > /dev/null
    11       gsdlhome=`pwd`
    12       popd > /dev/null
     3if [ "$GSDLHOME" == "" ]; then
     4    echo You must run \'source setup.bash\' in the top level folder of your Greenstone installation before running this script
     5    exit
    136fi
    147
    15 if [ ! -d build ]; then
    16   mkdir build
    17 fi
    18 cd build
     8top_dir=`pwd`
     9shared_dir=`pwd`/../shared
     10source_dir=`pwd`/xml-source
     11processing_dir=`pwd`/processing
     12output_dir=`pwd`/build
    1913
    20 echo "procesing english version"
    21 if [ ! -d en ]; then
    22     mkdir en
    23 fi
    24 cd en
    25 mkdir html
     14mkdir $output_dir
     15cp $processing_dir/style.css $output_dir/
    2616
    27 cp -r $sources/en/images .
    28 cp $processing/style.css .
     17langs="en es fr ru"
     18manuals="Develop User Install Paper"
    2919
    30 echo "User's manual (english)"
    31 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/en/User_en.xml > html/User_en_index.html
    32 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/en/User_en.xml > html/User_en_all.html
    33 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/en/User_en.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    34 mv *.htm html/
     20echo "processing top level index"
     21java -cp $shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-top-index.xsl  $processing_dir/manifest.xml > $output_dir/index.html
    3522
    36 echo "Installer's manual (english)"
    37 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/en/Install_en.xml > html/Install_en_index.html
    38 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/en/Install_en.xml > html/Install_en_all.html
    39 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/en/Install_en.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    40 mv *.htm html/
     23for l in $langs; do
     24    echo "Processing $l version"
     25    mkdir $output_dir/$l
     26    cd $output_dir/$l
     27   
     28    mkdir html
     29    cp -r $source_dir/$l/images .       
    4130
    42 echo "Developer's manual (english)"
    43 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/en/Develop_en.xml > html/Develop_en_index.html
    44 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/en/Develop_en.xml > html/Develop_en_all.html
    45 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/en/Develop_en.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    46 mv *.htm html/
    47 
    48 echo "From paper to collection (english)"
    49 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/en/Paper_en.xml > html/Paper_en_index.html
    50 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/en/Paper_en.xml > html/Paper_en_all.html
    51 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/en/Paper_en.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    52 mv *.htm html/
    53 
    54 cd ..
    55 
    56 
    57 echo "procesing french version"
    58 if [ ! -d fr ]; then
    59     mkdir fr
    60 fi
    61 cd fr
    62 mkdir html
    63 
    64 cp -r $sources/en/images .
    65 cp $processing/style.css .
    66 
    67 echo "User's manual (french)"
    68 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/fr/User_fr.xml > html/User_fr_index.html
    69 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/fr/User_fr.xml > html/User_fr_all.html
    70 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/fr/User_fr.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    71 mv *.htm html/
    72 
    73 echo "Installer's manual (french)"
    74 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/fr/Install_fr.xml > html/Install_fr_index.html
    75 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/fr/Install_fr.xml > html/Install_fr_all.html
    76 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/fr/Install_fr.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    77 mv *.htm html/
    78 
    79 echo "Developer's manual (french)"
    80 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/fr/Develop_fr.xml > html/Develop_fr_index.html
    81 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/fr/Develop_fr.xml > html/Develop_fr_all.html
    82 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/fr/Develop_fr.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    83 mv *.htm html/
    84 
    85 echo "From paper to collection (french)"
    86 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/fr/Paper_fr.xml > html/Paper_fr_index.html
    87 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/fr/Paper_fr.xml > html/Paper_fr_all.html
    88 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/fr/Paper_fr.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    89 mv *.htm html/
    90 
    91 cd ..
    92 
    93 
    94 echo "procesing spanish version"
    95 if [ ! -d es ]; then
    96     mkdir es
    97 fi
    98 cd es
    99 mkdir html
    100 cp -r $sources/en/images .
    101 cp $processing/style.css .
    102 
    103 echo "User's manual (spanish)"
    104 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/es/User_es.xml > html/User_es_index.html
    105 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/es/User_es.xml > html/User_es_all.html
    106 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/es/User_es.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    107 mv *.htm html/
    108 
    109 echo "Installer's manual (spanish)"
    110 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/es/Install_es.xml > html/Install_es_index.html
    111 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/es/Install_es.xml > html/Install_es_all.html
    112 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/es/Install_es.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    113 mv *.htm html/
    114 
    115 echo "Developer's manual (spanish)"
    116 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/es/Develop_es.xml > html/Develop_es_index.html
    117 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/es/Develop_es.xml > html/Develop_es_all.html
    118 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/es/Develop_es.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    119 mv *.htm html/
    120 
    121 echo "From paper to collection (spanish)"
    122 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/es/Paper_es.xml > html/Paper_es_index.html
    123 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/es/Paper_es.xml > html/Paper_es_all.html
    124 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/es/Paper_es.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    125 mv *.htm html/
    126 
    127 cd ..
    128 
    129 
    130 echo "procesing russian version"
    131 if [ ! -d ru ]; then
    132     mkdir ru
    133 fi
    134 cd ru
    135 mkdir html
    136 
    137 cp -r $sources/en/images .
    138 cp $processing/style.css .
    139 
    140 echo "User's manual (russian)"
    141 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/ru/User_ru.xml > html/User_ru_index.html
    142 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/ru/User_ru.xml > html/User_ru_all.html
    143 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/ru/User_ru.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    144 mv *.htm html/
    145 
    146 echo "Installer's manual (russian)"
    147 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/ru/Install_ru.xml > html/Install_ru_index.html
    148 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/ru/Install_ru.xml > html/Install_ru_all.html
    149 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/ru/Install_ru.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    150 mv *.htm html/
    151 
    152 echo "Developer's manual (russian)"
    153 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/ru/Develop_ru.xml > html/Develop_ru_index.html
    154 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/ru/Develop_ru.xml > html/Develop_ru_all.html
    155 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/ru/Develop_ru.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    156 mv *.htm html/
    157 
    158 echo "From paper to collection (russian)"
    159 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-index.xsl $sources/ru/Paper_ru.xml > html/Paper_ru_index.html
    160 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-one-html.xsl $sources/ru/Paper_ru.xml > html/Paper_ru_all.html
    161 java -cp $gsdlhome/gli:$shared ApplyXSLT $processing/xml-to-many-html.xsl $sources/ru/Paper_ru.xml | perl -S $gsdlhome/gli/help/splithelpdocument.pl
    162 mv *.htm html/
    163 
    164 cd ..
    165 
    166 cd ..
     31    for m in $manuals; do
     32        java -cp $shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-index.xsl $source_dir/$l/"$m"_"$l".xml > html/"$m"_"$l"_index.html
     33        java -cp $shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-one-html.xsl $source_dir/$l/"$m"_"$l".xml > html/"$m"_"$l"_all.html
     34        java -cp $shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-many-html.xsl $source_dir/$l/"$m"_"$l".xml | perl -S $GSDLHOME/gli/help/splithelpdocument.pl
     35        mv *.htm html/
     36    done
     37    cd $top_dir
     38done
  • 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.