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

Last change on this file since 24145 was 24145, checked in by sjm84, 10 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
Line 
1#!/bin/bash
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`/html
13
14export CLASSPATH=$shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar
15
16mkdir $output_dir
17
18langs="en fr es ru"
19
20echo "processing top level index"
21java -DGSDLHOME=$GSDLHOME ApplyXSLT en $processing_dir/xml-to-top-index.xsl $source_dir/tutorial_en.xml > $output_dir/index.html
22
23echo "generating wiki index page"
24java -DGSDLHOME=$GSDLHOME ApplyXSLT en $processing_dir/xml-to-wiki-index.xsl $source_dir/tutorial_en.xml > $output_dir/wiki-index.txt
25
26for l in $langs; do
27 echo "Processing $l version"
28 mkdir $output_dir/$l
29 cd $output_dir/$l
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
33 cd $top_dir
34done
35
36
37
Note: See TracBrowser for help on using the repository browser.