source: documentation/branches/2.80/tutorials/generate-html.sh@ 18250

Last change on this file since 18250 was 13708, checked in by kjdon, 17 years ago

modified sh scripts for new gsdl-documentation package, with new locations for source, xsl, and output

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
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`/html
13
14mkdir $output_dir
15
16langs="en fr es ru"
17
18echo "processing top level index"
19java -cp $shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-top-index.xsl $source_dir/tutorial_en.xml > $output_dir/index.html
20
21echo "generating wiki index page"
22java -cp $shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-wiki-index.xsl $source_dir/tutorial_en.xml > $output_dir/wiki-index.txt
23
24for l in $langs; do
25 echo "Processing $l version"
26 mkdir $output_dir/$l
27 cd $output_dir/$l
28 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/tutorial_$l.xml > index.html
29 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/tutorial_$l.xml > all_tutorials.html
30 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/tutorial_$l.xml | perl -S $GSDLHOME/gli/help/splithelpdocument.pl
31 cd $top_dir
32done
33
34
35
Note: See TracBrowser for help on using the repository browser.