From 1cf5a13b0871b4612a78e94911beed9e1fd4ce89 Mon Sep 17 00:00:00 2001 From: GMT 1999 Tony Gale Date: Thu, 28 Jan 1999 12:22:36 +0000 Subject: [PATCH] script to convert and package up the tutorial - stick it here so I don't Thu Jan 28 12:14:12 GMT 1999 Tony Gale * docs/package_tutorial.sh: script to convert and package up the tutorial - stick it here so I don't lose it when I accidentally delete it again. --- ChangeLog | 6 ++ ChangeLog.pre-2-0 | 6 ++ ChangeLog.pre-2-10 | 6 ++ ChangeLog.pre-2-2 | 6 ++ ChangeLog.pre-2-4 | 6 ++ ChangeLog.pre-2-6 | 6 ++ ChangeLog.pre-2-8 | 6 ++ docs/package_tutorial.sh | 99 +++++++++++++++++++++++++++++++ docs/tutorial/package_tutorial.sh | 99 +++++++++++++++++++++++++++++++ 9 files changed, 240 insertions(+) create mode 100755 docs/package_tutorial.sh create mode 100755 docs/tutorial/package_tutorial.sh diff --git a/ChangeLog b/ChangeLog index d2d624c6b2..74123c584a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Jan 28 12:14:12 GMT 1999 Tony Gale + + * docs/package_tutorial.sh: script to convert and + package up the tutorial - stick it here so I don't lose + it when I accidentally delete it again. + Thu Jan 28 10:16:28 GMT 1999 Tony Gale * docs/gtk_tut.sgml: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index d2d624c6b2..74123c584a 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Thu Jan 28 12:14:12 GMT 1999 Tony Gale + + * docs/package_tutorial.sh: script to convert and + package up the tutorial - stick it here so I don't lose + it when I accidentally delete it again. + Thu Jan 28 10:16:28 GMT 1999 Tony Gale * docs/gtk_tut.sgml: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d2d624c6b2..74123c584a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Thu Jan 28 12:14:12 GMT 1999 Tony Gale + + * docs/package_tutorial.sh: script to convert and + package up the tutorial - stick it here so I don't lose + it when I accidentally delete it again. + Thu Jan 28 10:16:28 GMT 1999 Tony Gale * docs/gtk_tut.sgml: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d2d624c6b2..74123c584a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Thu Jan 28 12:14:12 GMT 1999 Tony Gale + + * docs/package_tutorial.sh: script to convert and + package up the tutorial - stick it here so I don't lose + it when I accidentally delete it again. + Thu Jan 28 10:16:28 GMT 1999 Tony Gale * docs/gtk_tut.sgml: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d2d624c6b2..74123c584a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Thu Jan 28 12:14:12 GMT 1999 Tony Gale + + * docs/package_tutorial.sh: script to convert and + package up the tutorial - stick it here so I don't lose + it when I accidentally delete it again. + Thu Jan 28 10:16:28 GMT 1999 Tony Gale * docs/gtk_tut.sgml: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d2d624c6b2..74123c584a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Thu Jan 28 12:14:12 GMT 1999 Tony Gale + + * docs/package_tutorial.sh: script to convert and + package up the tutorial - stick it here so I don't lose + it when I accidentally delete it again. + Thu Jan 28 10:16:28 GMT 1999 Tony Gale * docs/gtk_tut.sgml: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d2d624c6b2..74123c584a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Thu Jan 28 12:14:12 GMT 1999 Tony Gale + + * docs/package_tutorial.sh: script to convert and + package up the tutorial - stick it here so I don't lose + it when I accidentally delete it again. + Thu Jan 28 10:16:28 GMT 1999 Tony Gale * docs/gtk_tut.sgml: diff --git a/docs/package_tutorial.sh b/docs/package_tutorial.sh new file mode 100755 index 0000000000..4f54f63f41 --- /dev/null +++ b/docs/package_tutorial.sh @@ -0,0 +1,99 @@ +#! /bin/sh +# package_tutorial.sh - Package up the tutorial into various formats +# Copyright (C) Tony Gale 1999 +# Contact: gale@gtk.org +# +# NOTE: This script requires the following to be installed: +# o SGML Tools +# o Latex +# o DVI tools + +TARGET=`pwd`/gtk_tut.sgml +GIFS="`pwd`/*.gif" +EXAMPLES=`pwd`/../examples + +PATH=`pwd`:$PATH + +DATE=`date '+%y%m%d'` + +# Check top level directory +if [ ! -d gtk_tutorial ]; then + if [ -e gtk_tutorial ]; then + echo "ERROR: gtk_tutorial is not a directory" + exit + fi + mkdir gtk_tutorial.$DATE +fi + +cd gtk_tutorial.$DATE + +# SGML Format +echo -n "Copy SGML and GIF's.... " +if [ ! -d sgml ]; then + if [ -e sgml ]; then + echo "ERROR: html is not a directory" + exit + fi + mkdir sgml +fi + +(cd sgml ; cp $TARGET . ; cp $GIFS .) +echo "done" + +# HTML Format +echo -n "Formatting into HTML.... " +if [ ! -d html ]; then + if [ -e html ]; then + echo "ERROR: html is not a directory" + exit + fi + mkdir html +fi + +(cd html ; sgml2html $TARGET ; cp $GIFS .) +echo "done" + +# Text Format +echo -n "Formatting into Text.... " +if [ ! -d txt ]; then + if [ -e txt ]; then + echo "ERROR: txt is not a directory" + exit + fi + mkdir txt +fi + +(cd txt ; sgml2txt -f $TARGET 2>&1 > /dev/null ) +echo "done" + +# PS and DVI Format +echo -n "Formatting into PS and DVI.... " +if [ ! -d ps ]; then + if [ -e ps ]; then + echo "ERROR: ps is not a directory" + exit + fi + mkdir ps +fi + +(cd ps ; sgml2latex --output=ps $TARGET > /dev/null) +(cd ps ; sgml2latex $TARGET > /dev/null) +echo "done" + +# Copy examples +echo -n "Copying examples" +cp -R $EXAMPLES . +(cd examples ; make clean ; rm -rf CVS */CVS) +echo "done" + +# Package it all up +echo -n "Creating packages.... " +cd .. +tar cvfz gtk_tutorial.$DATE.tar.gz gtk_tutorial.$DATE +echo "done" + +rm -rf gtk_tutorial.$DATE + +echo +echo Package gtk_tutorial.$DATE.tar.gz created. +echo diff --git a/docs/tutorial/package_tutorial.sh b/docs/tutorial/package_tutorial.sh new file mode 100755 index 0000000000..4f54f63f41 --- /dev/null +++ b/docs/tutorial/package_tutorial.sh @@ -0,0 +1,99 @@ +#! /bin/sh +# package_tutorial.sh - Package up the tutorial into various formats +# Copyright (C) Tony Gale 1999 +# Contact: gale@gtk.org +# +# NOTE: This script requires the following to be installed: +# o SGML Tools +# o Latex +# o DVI tools + +TARGET=`pwd`/gtk_tut.sgml +GIFS="`pwd`/*.gif" +EXAMPLES=`pwd`/../examples + +PATH=`pwd`:$PATH + +DATE=`date '+%y%m%d'` + +# Check top level directory +if [ ! -d gtk_tutorial ]; then + if [ -e gtk_tutorial ]; then + echo "ERROR: gtk_tutorial is not a directory" + exit + fi + mkdir gtk_tutorial.$DATE +fi + +cd gtk_tutorial.$DATE + +# SGML Format +echo -n "Copy SGML and GIF's.... " +if [ ! -d sgml ]; then + if [ -e sgml ]; then + echo "ERROR: html is not a directory" + exit + fi + mkdir sgml +fi + +(cd sgml ; cp $TARGET . ; cp $GIFS .) +echo "done" + +# HTML Format +echo -n "Formatting into HTML.... " +if [ ! -d html ]; then + if [ -e html ]; then + echo "ERROR: html is not a directory" + exit + fi + mkdir html +fi + +(cd html ; sgml2html $TARGET ; cp $GIFS .) +echo "done" + +# Text Format +echo -n "Formatting into Text.... " +if [ ! -d txt ]; then + if [ -e txt ]; then + echo "ERROR: txt is not a directory" + exit + fi + mkdir txt +fi + +(cd txt ; sgml2txt -f $TARGET 2>&1 > /dev/null ) +echo "done" + +# PS and DVI Format +echo -n "Formatting into PS and DVI.... " +if [ ! -d ps ]; then + if [ -e ps ]; then + echo "ERROR: ps is not a directory" + exit + fi + mkdir ps +fi + +(cd ps ; sgml2latex --output=ps $TARGET > /dev/null) +(cd ps ; sgml2latex $TARGET > /dev/null) +echo "done" + +# Copy examples +echo -n "Copying examples" +cp -R $EXAMPLES . +(cd examples ; make clean ; rm -rf CVS */CVS) +echo "done" + +# Package it all up +echo -n "Creating packages.... " +cd .. +tar cvfz gtk_tutorial.$DATE.tar.gz gtk_tutorial.$DATE +echo "done" + +rm -rf gtk_tutorial.$DATE + +echo +echo Package gtk_tutorial.$DATE.tar.gz created. +echo