blob: 67711e93f599a4f97b2352a577a2da7358947896 [file] [log] [blame]
John R. Sheets8c63fb62001-01-19 20:58:37 +00001#!/bin/sh
2
3## John R. Sheets <jsheets@codeweavers.com>
4
5## This is a convenience script for building the website docs for
6## www.winehq.com. It creates tarballs of the HTML with special
7## server-side includes and CSS settings that aren't appropriate for
8## the mainline Wine tree. For this reason, and to make it easier to
9## set up an automated website update system, I'm putting this in
10## a standalone shell script.
11##
12## There's no need to invoke the Wine make system just for web
13## updates. For example, we can just grab the documentation
14## subdirectory, without having to pull the entire wine tree:
15##
16## $ cvs co wine/documentation
17## $ cd wine/documentation
18## $ ./make_winehq
19## $ rsync ...
20
21WWWDIR=www.winehq.com
22## Want to put this into a sub-directory for easier maintenance
Francois Gouget42dcd972002-01-29 17:52:28 +000023if [ -d "$WWWDIR" -o -f "$WWWDIR" ]; then
Andreas Mohr8c2e5732001-11-25 00:51:36 +000024 rm -rf "$WWWDIR.old"
25 mv "$WWWDIR" "$WWWDIR".old
John R. Sheets8c63fb62001-01-19 20:58:37 +000026fi
Andreas Mohr8c2e5732001-11-25 00:51:36 +000027mkdir "$WWWDIR"
John R. Sheets8c63fb62001-01-19 20:58:37 +000028
29## Create four-book HTML tarball
30echo "./db2html-winehq wine-user.sgml"
31./db2html-winehq wine-user.sgml
32echo "./db2html-winehq wine-devel.sgml"
33./db2html-winehq wine-devel.sgml
34echo "./db2html-winehq winelib-user.sgml"
35./db2html-winehq winelib-user.sgml
36echo "./db2html-winehq wine-pkg.sgml"
37./db2html-winehq wine-pkg.sgml
38tar czf winedoc-html.tgz wine-user wine-devel winelib-user wine-pkg
Andreas Mohr8c2e5732001-11-25 00:51:36 +000039cp winedoc-html.tgz "$WWWDIR"
John R. Sheets8c63fb62001-01-19 20:58:37 +000040
41## Create one-book HTML tarball
42echo "./db2html-winehq wine-doc.sgml"
43./db2html-winehq wine-doc.sgml
44tar czf wine-set-html.tgz wine-doc
Andreas Mohr8c2e5732001-11-25 00:51:36 +000045cp wine-set-html.tgz "$WWWDIR"
John R. Sheets8c63fb62001-01-19 20:58:37 +000046
47## Create PostScript tarball
Susan Farley3b10efe2001-09-26 23:02:31 +000048echo "db2ps -d ./print.dsl wine-user.sgml"
49db2ps -d ./print.dsl wine-user.sgml > /dev/null 2>&1
50echo "db2ps -d ./print.dsl wine-devel.sgml"
51db2ps -d ./print.dsl wine-devel.sgml > /dev/null 2>&1
52echo "db2ps -d ./print.dsl winelib-user.sgml"
53db2ps -d ./print.dsl winelib-user.sgml > /dev/null 2>&1
54echo "db2ps -d ./print.dsl wine-pkg.sgml"
55db2ps -d ./print.dsl wine-pkg.sgml > /dev/null 2>&1
John R. Sheets8c63fb62001-01-19 20:58:37 +000056tar czf winedoc-ps.tgz wine-user.ps wine-devel.ps winelib-user.ps wine-pkg.ps
Andreas Mohr8c2e5732001-11-25 00:51:36 +000057cp winedoc-ps.tgz "$WWWDIR"
John R. Sheets8c63fb62001-01-19 20:58:37 +000058
59## Create PDF tarball
Susan Farley3b10efe2001-09-26 23:02:31 +000060echo "db2pdf -d ./print.dsl wine-user.sgml"
61db2pdf -d ./print.dsl wine-user.sgml > /dev/null 2>&1
62echo "db2pdf -d ./print.dsl wine-devel.sgml"
63db2pdf -d ./print.dsl wine-devel.sgml > /dev/null 2>&1
64echo "db2pdf -d ./print.dsl winelib-user.sgml"
65db2pdf -d ./print.dsl winelib-user.sgml > /dev/null 2>&1
66echo "db2pdf -d ./print.dsl wine-pkg.sgml"
67db2pdf -d ./print.dsl wine-pkg.sgml > /dev/null 2>&1
John R. Sheets8c63fb62001-01-19 20:58:37 +000068tar czf winedoc-pdf.tgz wine-user.pdf wine-devel.pdf winelib-user.pdf wine-pkg.pdf
Andreas Mohr8c2e5732001-11-25 00:51:36 +000069cp winedoc-pdf.tgz "$WWWDIR"
John R. Sheets8c63fb62001-01-19 20:58:37 +000070
71## Create SGML tarball
72echo "Creating SGML package..."
73tar czf winedoc-sgml.tgz *.sgml *.dsl *.ent db2html-winehq
Andreas Mohr8c2e5732001-11-25 00:51:36 +000074cp winedoc-sgml.tgz "$WWWDIR"
John R. Sheets8c63fb62001-01-19 20:58:37 +000075
76## Done creating downloadable tarballs for users. Now we want to
77## create a tarball of SHTML in a slightly different form, for the
78## website. These versions use special server-side includes which
79## aren't appropriate outside of winehq.com.
80##
81## Use the special website stylesheet
82export WINEDOC_STYLESHEET=../winehq.dsl
83
84## Create four-book SHTML tarball
85echo "./db2html-winehq wine-user.sgml"
86./db2html-winehq wine-user.sgml
87echo "./db2html-winehq wine-devel.sgml"
88./db2html-winehq wine-devel.sgml
89echo "./db2html-winehq winelib-user.sgml"
90./db2html-winehq winelib-user.sgml
91echo "./db2html-winehq wine-pkg.sgml"
92./db2html-winehq wine-pkg.sgml
93tar czf winehq-shtml.tgz wine-user wine-devel winelib-user wine-pkg
Andreas Mohr8c2e5732001-11-25 00:51:36 +000094cp winehq-shtml.tgz "$WWWDIR"
John R. Sheets8c63fb62001-01-19 20:58:37 +000095