root/documentation/trunk/manuals/generate-html.sh @ 17494

Revision 17494, 1.6 KB (checked in by anna, 12 years ago)

Updated tutorials and associated files.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/bin/sh
2
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
6fi
7
8top_dir=`pwd`
9shared_dir=`pwd`/../shared
10source_dir=`pwd`/xml-source
11processing_dir=`pwd`/processing
12output_dir=`pwd`/build
13
14mkdir $output_dir
15cp $processing_dir/style.css $output_dir/
16
17langs="en es fr ru ar"
18manuals="Develop User Install Paper"
19
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
22
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 .       
30
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
Note: See TracBrowser for help on using the browser.