# call in doc/ !

VERSION=1.5.1

######################################

if [ ! -d "$1" ]; then
	echo "Usage : ./build-handbook <LANG>"
	exit	
fi

LANG=$1

echo "building pdf handbook for LabPlot $VERSION (language $LANG) ..."

mkdir tmp/
cp $LANG/index.docbook tmp/
cp -pRL en/common/ en/small_pics/ tmp/

cd tmp/
# check out /opt/kde3/share/apps/ksgmltools2/customization/README
meinproc --stylesheet /opt/kde3/share/apps/ksgmltools2/customization/kde-nochunk.xsl index.docbook
../makedoc.sh

html2ps index.html > LabPlot-$VERSION-$LANG.ps
ps2pdf LabPlot-$VERSION-$LANG.ps ../LabPlot-$VERSION-$LANG.pdf

cd ..
rm -rf tmp/

echo "Done"
