-- $Id: README,v 1.1 1996/09/20 17:54:47 joke Rel $
NAME
This is a very short description of `patchbase' and it's complementary
`unpatchbase' program (both being simple Bourne shell scripts).
You will need these programs, when you mirror a site, e.g. the GNU Website,
that uses absolute paths in all HTML references, and thus can only be copied
to a mirror server's root directory, which is certainly NOT what most mirror
admins or other people want.
Thus, `patcbase' helps you to install a mirror of such site, in any place
you want, by (a) converting all "local" references in the HTML sources to
relative ones; and (b) inserting a tag in the
of
all HTML documents, which makes all of the local references generated from
step (a) acessible from their new location on the mirror site.
SYNOPSIS
patchbase []
unpatchbase []
DESCRIPTION
On invocation `patchbase' walks through the directory hierarchy given on
it's command line or anything below the current directory, finds files with
suffix `.htm' or `.html' and replaces the tag in all of theses files
with:
where `the-url-given-to-patchbase' is the URL that points to the directory
you have installed the files. Moreover, all absolute refs in the HTML code,
i.e., `HREF="/.."' and `SRC="/.."' are converted to relative references,
simply by deleting the leading `/'.
On invocation `unpatchbase' undoes the effects `patchbase' had on the HTML
files in the directory hierarchy given on it's command line, or the current
directory.
EXAMPLE
To create a mirror of the GNU Web site http://www.gnu.org/ you'd
simply:
(1) create a directory anywhere on your site, say `.../public/webland/gnu',
where `.../public/webland/gnu' is accessible via URL `http://foobar.com/
webland/gnu/'
(2) copy the GNU site to this directory, using url_get(1), webcopy(1),
or whatever you like.
(3) `cd' to the `.../public/webland/gnu' directory and invoke `patchbase':
patchbase http://foobar.com/webland/gnu/ .
CAVEAT
`unpatchbase' can only restore HTML files modified by `patchbase' to their
original state, if and only if they did contain the tag on a single
line. Any other (HTML) text after this tag, present in the original source,
is lost.
AUTHOR
Joerg Heitkoetter. This stuff is PD; do whatever you want.
Send updates, comments, and all the fish to joke@de.uu.net