Index: trunk/gsdl-documentation/manuals/generate-pdf.sh
===================================================================
--- trunk/gsdl-documentation/manuals/generate-pdf.sh	(revision 13647)
+++ trunk/gsdl-documentation/manuals/generate-pdf.sh	(revision 13782)
@@ -1,103 +1,29 @@
 #!/bin/sh
 
-gsdlhome=$GSDLHOME
-shared="../shared"
-export CLASSPATH=$CLASSPATH:$shared:$shared/fop/build/fop.jar:$shared/fop/lib
-fop="$shared/fop"
-processing="processing"
+top_dir=`pwd`
+shared_dir=`pwd`/../shared
+source_dir=`pwd`/xml-source
+processing_dir=`pwd`/processing
+output_dir=`pwd`/build
+fop_dir="$shared_dir/fop"
+export CLASSPATH=$CLASSPATH:$shared_dir:$fop_dir/build/fop.jar:$fop_dir/lib
 
-if [ "$gsdlhome" == "" ]; then
-    # assume tutorials in a subdir of gsdl
-      pushd .. > /dev/null
-      gsdlhome=`pwd`
-      popd > /dev/null
+if [ ! -d $output_dir ]; then
+  mkdir $output_dir
 fi
 
-if [ ! -d build ]; then
-  mkdir build
-fi
+langs="en " #fr es ru
+manuals="Develop Install Paper" #User
 
-cd build
+for l in $langs; do
+    echo "Processing $l version"
+    if [ ! -d $output_dir/$l ]; then		 
+	    mkdir $output_dir/$l
+	  fi
+    mkdir $output_dir/$l/pdf
+    
+    for m in $manuals; do    				
+			$fop_dir/fop.sh -q -xsl $processing_dir/xml-to-pdf.xsl -xml $source_dir/$l/"$m"_"$l".xml -pdf $output_dir/$l/pdf/"$m"_"$l".pdf
+    done
+done
 
-echo "procesing english manuals"
-if [ ! -d en ]; then
-	mkdir en
-fi
-cd en
-mkdir pdf
-
-#back to the manual directory
-cd ..
-cd ..
-
-pdf="build/en/pdf"
-#echo "User's manual (english)"
-#$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/User_en.xml -pdf $pdf/User_en.pdf
-echo "Developer's manual (english)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/en/Develop_en.xml -pdf $pdf/Develop_en.pdf
-echo "Installer's manual (english)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/en/Install_en.xml -pdf $pdf/Install_en.pdf
-echo "From Paper to Collection (english)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/en/Paper_en.xml -pdf $pdf/Paper_en.pdf
-
-
-echo "procesing french manuals"
-cd build
-if [ ! -d fr ]; then
-	mkdir fr
-fi
-cd fr
-mkdir pdf
-cd ..
-cd ..
-pdf="build/fr/pdf"
-
-#echo "User's manual (french)"
-#$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/fr/User_fr.xml -pdf $pdf/User_fr.pdf
-echo "Developer's manual (french)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/fr/Develop_fr.xml -pdf $pdf/Develop_fr.pdf
-echo "Installer's manual (french)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/fr/Install_fr.xml -pdf $pdf/Install_fr.pdf
-echo "From Paper to Collection (french)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/fr/Paper_fr.xml -pdf $pdf/Paper_fr.pdf
-
-
-echo "procesing spanish manuals"
-cd build
-if [ ! -d es ]; then
-	mkdir es
-fi
-cd es
-mkdir pdf
-cd ..
-cd ..
-pdf="build/es/pdf"
-
-#echo "User's manual (spanish)"
-#$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/es/User_es.xml -pdf $pdf/User_es.pdf
-echo "Developer's manual (spanish)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/es/Develop_es.xml -pdf $pdf/Develop_es.pdf
-echo "Installer's manual (spanish)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/es/Install_es.xml -pdf $pdf/Install_es.pdf
-echo "From Paper to Collection (spanish)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/es/Paper_es.xml -pdf $pdf/Paper_es.pdf
-
-
-echo "procesing russian manuals"
-cd build
-if [ ! -d ru ]; then
-	mkdir ru
-fi
-cd ru
-mkdir pdf
-cd ..
-cd ..
-pdf="build/ru/pdf"
-#echo "User's manual (russian)"
-#$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/ru/User_ru.xml -pdf $pdf/User_ru.pdf
-echo "Developer's manual (russian)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/ru/Develop_ru.xml -pdf $pdf/Develop_ru.pdf
-echo "User's manual (russian)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/ru/Install_ru.xml -pdf $pdf/Install_ru.pdf
-echo "From Paper to Collection (russian)"
-$fop/fop.sh -q -xsl $processing/xml-to-pdf.xsl -xml xml-source/ru/Paper_ru.xml -pdf $pdf/Paper_ru.pdf
