source: documentation/trunk/manuals/generate-html.sh@ 17494

Last change on this file since 17494 was 17494, checked in by anna, 16 years ago

Updated tutorials and associated files.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
RevLine 
[13632]1#!/bin/sh
2
[13782]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
[13632]6fi
7
[13782]8top_dir=`pwd`
9shared_dir=`pwd`/../shared
10source_dir=`pwd`/xml-source
11processing_dir=`pwd`/processing
12output_dir=`pwd`/build
[13647]13
[13782]14mkdir $output_dir
15cp $processing_dir/style.css $output_dir/
[13632]16
[17494]17langs="en es fr ru ar"
[13782]18manuals="Develop User Install Paper"
[13647]19
[13782]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
[13632]22
[13782]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 .
[13632]30
[13782]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 repository browser.