2 # package_tutorial.sh - Package up the tutorial into various formats
3 # Copyright (C) Tony Gale 1999
4 # Contact: gale@gtk.org
6 # NOTE: This script requires the following to be installed:
11 TARGET=`pwd`/gtk_tut.sgml
13 EXAMPLES=`pwd`/../examples
19 # Check top level directory
20 if [ ! -d gtk_tutorial ]; then
21 if [ -e gtk_tutorial ]; then
22 echo "ERROR: gtk_tutorial is not a directory"
25 mkdir gtk_tutorial.$DATE
31 echo -n "Copy SGML and GIF's.... "
32 if [ ! -d sgml ]; then
34 echo "ERROR: html is not a directory"
40 (cd sgml ; cp $TARGET . ; cp $GIFS .)
44 echo -n "Formatting into HTML.... "
45 if [ ! -d html ]; then
47 echo "ERROR: html is not a directory"
53 (cd html ; sgml2html $TARGET ; cp $GIFS .)
57 echo -n "Formatting into Text.... "
60 echo "ERROR: txt is not a directory"
66 (cd txt ; sgml2txt -f $TARGET 2>&1 > /dev/null )
70 echo -n "Formatting into PS and DVI.... "
73 echo "ERROR: ps is not a directory"
79 (cd ps ; sgml2latex --output=ps $TARGET > /dev/null)
80 (cd ps ; sgml2latex $TARGET > /dev/null)
84 echo -n "Copying examples"
86 (cd examples ; make clean ; rm -rf CVS */CVS)
90 echo -n "Creating packages.... "
92 tar cvfz gtk_tutorial.$DATE.tar.gz gtk_tutorial.$DATE
95 rm -rf gtk_tutorial.$DATE
98 echo Package gtk_tutorial.$DATE.tar.gz created.