root/documentation/trunk/tutorials/generate-html.sh @ 18754

Revision 18754, 1.3 KB (checked in by oranfry, 11 years ago)

cleaning up a few properties

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
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 $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 $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 $processing_dir/xml-to-index.xsl $source_dir/tutorial_$l.xml > index.html
31    java -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-one-html.xsl $source_dir/tutorial_$l.xml > all_tutorials.html
32    java -DGSDLHOME=$GSDLHOME ApplyXSLT $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 browser.