source: documentation/trunk/tutorials/generate-html.sh@ 24145

Last change on this file since 24145 was 24145, checked in by sjm84, 13 years ago

A lang parameter was added to ApplyXSLT.java so this file needed to be updated

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
RevLine 
[18754]1#!/bin/bash
[13636]2
3if [ "$GSDLHOME" == "" ]; then
[18754]4 echo "You must run 'source setup.bash' in the top level folder of your Greenstone installation before running this script"
[13636]5 exit
6fi
7
[13708]8top_dir=`pwd`
9shared_dir=`pwd`/../shared
10source_dir=`pwd`/xml-source
11processing_dir=`pwd`/processing
12output_dir=`pwd`/html
[13636]13
[18754]14export CLASSPATH=$shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar
15
[13708]16mkdir $output_dir
17
18langs="en fr es ru"
19
[13636]20echo "processing top level index"
[24145]21java -DGSDLHOME=$GSDLHOME ApplyXSLT en $processing_dir/xml-to-top-index.xsl $source_dir/tutorial_en.xml > $output_dir/index.html
[13636]22
23echo "generating wiki index page"
[24145]24java -DGSDLHOME=$GSDLHOME ApplyXSLT en $processing_dir/xml-to-wiki-index.xsl $source_dir/tutorial_en.xml > $output_dir/wiki-index.txt
[13636]25
[13708]26for l in $langs; do
27 echo "Processing $l version"
28 mkdir $output_dir/$l
29 cd $output_dir/$l
[24145]30 java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-index.xsl $source_dir/tutorial_$l.xml > index.html
31 java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-one-html.xsl $source_dir/tutorial_$l.xml > all_tutorials.html
32 java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-many-html.xsl $source_dir/tutorial_$l.xml | perl -S $GSDLHOME/gli/help/splithelpdocument.pl
[13708]33 cd $top_dir
34done
[13636]35
36
37
Note: See TracBrowser for help on using the repository browser.