create split package files

Tue Nov 26 18:28:58 GMT 2002  Tony Gale <gale@gtk.org>

        * docs/tutorial/package-db-tutorial.sh:
        (see #71679) create split package files
This commit is contained in:
GMT 2002 Tony Gale
2002-11-26 18:32:07 +00:00
committed by Tony Gale
parent 08c3c73bd3
commit 621ae3a60c
7 changed files with 104 additions and 61 deletions

View File

@ -1,3 +1,8 @@
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
(see #71679) create split package files
Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk> Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset * gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset

View File

@ -1,3 +1,8 @@
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
(see #71679) create split package files
Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk> Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset * gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset

View File

@ -1,3 +1,8 @@
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
(see #71679) create split package files
Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk> Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset * gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset

View File

@ -1,3 +1,8 @@
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
(see #71679) create split package files
Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk> Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset * gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset

View File

@ -1,3 +1,8 @@
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
(see #71679) create split package files
Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk> Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset * gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset

View File

@ -1,3 +1,8 @@
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
(see #71679) create split package files
Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk> Tue Nov 26 01:55:47 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset * gtk/gtkprogressbar.c (gtk_progress_bar_paint_text): don't offset

View File

@ -1,124 +1,137 @@
#! /bin/sh #! /bin/sh
# package_tutorial.sh - Package up the tutorial into various formats # package-db-tutorial.sh - Package up the tutorial into various formats
# Copyright (C) Tony Gale 2000 # Copyright (C) Tony Gale 2000-2002
# Contact: gale@gtk.org # Contact: gale@gtk.org
# #
# NOTE: This script requires the following to be installed: # NOTE: This script requires the following to be installed:
# o DocBook # o DocBook
# o DocBook-Utils
# o Jade # o Jade
# o Jadetex # o Jadetex
TARGET=`pwd`/gtk-tut.sgml TARGETDIR=`pwd`/2.0/
SOURCE=`pwd`/gtk-tut.sgml
IMAGES="`pwd`/images" IMAGES="`pwd`/images"
IMAGESDIR="images" IMAGESDIR="images"
EXAMPLES=`pwd`/../../examples EXAMPLES=`pwd`/../../examples
DATE=`date '+%Y%m%d'`
BUILDDIR=gtk-tutorial.$DATE
PATH=`pwd`:$PATH PATH=`pwd`:$PATH
DATE=`date '+%Y%m%d'` # Check target directory
if [ ! -d $TARGETDIR ]; then
# Check top level directory if [ -e $TARGETDIR ]; then
if [ ! -d gtk-tutorial.$DATE ]; then echo "ERROR: target directory is not a directory"
if [ -e gtk-tutorial.$DATE ]; then
echo "ERROR: gtk-tutorial is not a directory"
exit exit
fi fi
if ! mkdir gtk-tutorial.$DATE; then if ! mkdir $TARGETDIR; then
echo "mkdir failed" echo "mkdir for target directory failed"
exit
fi
fi
# Check top level build directory
if [ ! -d $BUILDDIR ]; then
if [ -e $BUILDDIR ]; then
echo "ERROR: build directory is not a directory"
exit
fi
if ! mkdir $BUILDDIR; then
echo "mkdir of build directory failed"
exit 1 exit 1
fi fi
fi fi
if ! cd gtk-tutorial.$DATE; then if ! cd $BUILDDIR; then
echo "cd failed" echo "cd to build directory failed"
exit 1 exit 1
fi fi
cp $TARGET . cp $SOURCE .
cp -R $IMAGES . cp -R $IMAGES .
# SGML Format # SGML Format
echo -n "Copy SGML and images.... " echo -n "Copy SGML and images.... "
if [ ! -d sgml ]; then if [ ! -d gtk-tutorial.sgml ]; then
if [ -e sgml ]; then if [ -e gtk-tutorial.sgml ]; then
echo "ERROR: html is not a directory" echo "ERROR: gtk-tutorial.sgml is not a directory"
exit exit
fi fi
mkdir sgml mkdir gtk-tutorial.sgml
fi fi
(cd sgml ; cp $TARGET . ; cp -R $IMAGES . ; rm -rf $IMAGESDIR/CVS) (cd gtk-tutorial.sgml && cp $SOURCE . && cp -R $IMAGES . && rm -rf $IMAGESDIR/CVS)
tar cvfz $TARGETDIR/gtk-tutorial.sgml.tgz gtk-tutorial.sgml
echo "done" echo "done"
# HTML Format # HTML Format
echo -n "Formatting into HTML.... " echo -n "Formatting into HTML.... "
if [ ! -d html ]; then if [ ! -d gtk-tutorial.html ]; then
if [ -e html ]; then if [ -e gtk-tutorial.html ]; then
echo "ERROR: html is not a directory" echo "ERROR: gtk-tutorial.html is not a directory"
exit exit
fi fi
mkdir html mkdir gtk-tutorial.html
fi fi
(db2html gtk-tut.sgml ; mv gtk-tut/* html ; cp -R $IMAGES html ; rm html/$IMAGESDIR/*.eps ; rm -rf gtk-tut) > /dev/null (db2html -o gtk-tutorial.html $SOURCE && cp -R $IMAGES gtk-tutorial.html && rm gtk-tutorial.html/$IMAGESDIR/*.eps) > /dev/null
(cd html ; ln -s book1.html index.html ; rm -rf $IMAGESDIR/CVS) (cd gtk-tutorial.html && rm -rf $IMAGESDIR/CVS && ln -s book1.html index.html)
tar cvfz $TARGETDIR/gtk-tutorial.html.tgz gtk-tutorial.html
echo "done" echo "done"
# PS, PDF and DVI Format # PS and PDF Format
echo -n "Formatting into PS, DVI and PDF.... " echo -n "Formatting into PS and PDF.... "
if [ ! -d ps ]; then if [ ! -d gtk-tutorial.ps ]; then
if [ -e ps ]; then if [ -e gtk-tutorial.ps ]; then
echo "ERROR: ps is not a directory" echo "ERROR: gtk-tutorial.ps is not a directory"
exit exit
fi fi
mkdir ps mkdir gtk-tutorial.ps
fi fi
if [ ! -d pdf ]; then if [ ! -d gtk-tutorial.pdf ]; then
if [ -e pdf ]; then if [ -e gtk-tutorial.pdf ]; then
echo "ERROR: pdf is not a directory" echo "ERROR: gtk-tutorial.pdf is not a directory"
exit exit
fi fi
mkdir pdf mkdir gtk-tutorial.pdf
fi fi
sed "s/images\/\(.*\)\.png/images\/\1.eps/g" gtk-tut.sgml > ps/gtk-tut.sgml sed "s/images\/\(.*\)\.png/images\/\1.eps/g" $SOURCE > gtk-tutorial.ps/gtk-tut.sgml
cp -R $IMAGES ps cp -R $IMAGES gtk-tutorial.ps
(cd ps ; db2dvi gtk-tut.sgml ; dvips gtk-tut.dvi -o gtk-tut.ps ; dvipdf gtk-tut.dvi ../pdf/gtk-tut.pdf) > /dev/null 2>&1 (cd gtk-tutorial.ps && db2dvi gtk-tut.sgml && dvips gtk-tut.dvi -o gtk-tut.ps && dvipdf gtk-tut.dvi ../gtk-tutorial.pdf/gtk-tut.pdf)
(cd ps ; rm gtk-tut.aux gtk-tut.log gtk-tut.sgml gtk-tut.tex ; rm -Rf $IMAGESDIR) > /dev/null 2>&1 gzip -c gtk-tutorial.ps/gtk-tut.ps > $TARGETDIR/gtk-tutorial.ps.gz
gzip -c gtk-tutorial.pdf/gtk-tut.pdf > $TARGETDIR/gtk-tutorial.pdf.gz
echo "done" echo "done"
# RTF Format # RTF Format
echo -n "Formatting into RTF.... " #echo -n "Formatting into RTF.... "
if [ ! -d rtf ]; then #if [ ! -d gtk-tutorial.rtf ]; then
if [ -e rtf ]; then # if [ -e gtk-tutorial.rtf ]; then
echo "ERROR: rtf is not a directory" # echo "ERROR: is not a directory"
exit # exit
fi # fi
mkdir rtf # mkdir gtk-tutorial.rtf
fi #fi
(db2rtf gtk-tut.sgml ; mv gtk-tut.rtf rtf) > /dev/null #cp -R $IMAGES gtk-tutorial.rtf
(cd rtf ; cp -R $IMAGES . ; rm -f $IMAGESDIR/*.eps ; rm -rf $IMAGESDIR/CVS) #(cd gtk-tutorial.rtf && db2rtf $SOURCE) # > /dev/null
echo "done" #gzip -c gtk-tutorial.rtf/gtk-tut.rtf > $TARGETDIR/gtk-tutorial.rtf.gz
#echo "done"
# Copy examples # Copy examples
echo -n "Copying examples" echo -n "Copying examples"
cp -R $EXAMPLES . cp -R $EXAMPLES .
(cd examples ; make clean ; rm -rf CVS */CVS */.cvsignore README.1ST extract.awk extract.sh find-examples.sh) (cd examples && make clean && rm -rf CVS */CVS */.cvsignore README.1ST extract.awk extract.sh find-examples.sh)
tar cfz $TARGETDIR/examples.tgz examples
echo "done" echo "done"
rm -f *
rm -rf $IMAGESDIR
# Package it all up
echo -n "Creating packages.... "
cd .. cd ..
tar cvfz gtk-tutorial.$DATE.tar.gz gtk-tutorial.$DATE rm -rf $BUILDDIR
echo "done"
rm -rf gtk-tutorial.$DATE
echo echo
echo Package gtk-tutorial.$DATE.tar.gz created. echo Packages created.
echo echo