#!/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`/build mkdir $output_dir cp $processing_dir/style.css $output_dir/ langs="en es fr ru ar" manuals="Develop User Install Paper" 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 $processing_dir/manifest.xml > $output_dir/index.html for l in $langs; do echo "Processing $l version" mkdir $output_dir/$l cd $output_dir/$l mkdir html cp -r $source_dir/$l/images . for m in $manuals; do 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 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 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 mv *.htm html/ done cd $top_dir done