source:
documentation/trunk/tutorials/generate-html.sh@
23259
Last change on this file since 23259 was 23259, checked in by , 13 years ago | |
---|---|
|
|
File size: 1.3 KB |
Rev | Line | |
---|---|---|
[18754] | 1 | #!/bin/bash |
[13636] | 2 | |
3 | if [ "$GSDLHOME" == "" ]; then | |
[18754] | 4 | echo "You must run 'source setup.bash' in the top level folder of your Greenstone installation before running this script" |
[13636] | 5 | exit |
6 | fi | |
7 | ||
[13708] | 8 | top_dir=`pwd` |
9 | shared_dir=`pwd`/../shared | |
10 | source_dir=`pwd`/xml-source | |
11 | processing_dir=`pwd`/processing | |
12 | output_dir=`pwd`/html | |
[13636] | 13 | |
[18754] | 14 | export CLASSPATH=$shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar |
15 | ||
[13708] | 16 | mkdir $output_dir |
17 | ||
18 | langs="en fr es ru" | |
19 | ||
[13636] | 20 | echo "processing top level index" |
[23259] | 21 | java -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-top-index.xsl $source_dir/tutorial_en.xml > $output_dir/index.html |
[13636] | 22 | |
23 | echo "generating wiki index page" | |
[23259] | 24 | java -DGSDLHOME=$GSDLHOME ApplyXSLT $processing_dir/xml-to-wiki-index.xsl $source_dir/tutorial_en.xml > $output_dir/wiki-index.txt |
[13636] | 25 | |
[13708] | 26 | for l in $langs; do |
27 | echo "Processing $l version" | |
28 | mkdir $output_dir/$l | |
29 | cd $output_dir/$l | |
[23259] | 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 | |
[13708] | 33 | cd $top_dir |
34 | done | |
[13636] | 35 | |
36 | ||
37 |
Note:
See TracBrowser
for help on using the repository browser.