#!/bin/sh if [ "$GSDLHOME" == "" ]; then echo You must run \'source setup.bash\' in the top level folder of your Greenstone installation before running this script exit fi top_dir=`pwd` shared_dir=`pwd`/../shared source_dir=`pwd`/xml-source processing_dir=`pwd`/processing output_dir=`pwd`/html mkdir $output_dir langs="en fr es ru" echo "processing top level index" java -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 echo "generating wiki index page" java -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 for l in $langs; do echo "Processing $l version" mkdir $output_dir/$l cd $output_dir/$l 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 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 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 cd $top_dir done