RelocHTML - a HTML relocator.
FIFOs - a simple FIFO buffer object.

Copyright (C)  1996  Peter Gerwinski  <peter.gerwinski@uni-essen.de>

RelocHTML and FIFOs are free software; you can redistribute and/or
modify them under the terms of the GNU General Public License
(RelocHTML), version 2, or the GNU Library General Public License
(FIFOs), version 2, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License
(file COPYING) and the GNU Library General Public License (file
COPYING.LIB) along with this package; if not, write to the Free 
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

RelocHTML and FIFOs are distributed in the hope that they will be 
useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
[Library] General Public License for more details.


relochtml.pas:

  a program to "relocate" HTML files such that <A HREFs and <IMG SRCes
  work from a different directory than the file had been written for.
  It can, for example, be used to mirror the GNU WWW home page,

      http://www.gnu.ai.mit.edu/server/web.tar.gz.

  To compile RelocHTML, type (at least;)

      gpc --automake relochtml.pas -o relochtml

  (On DOS or DOS-like platforms: -o relochtml.exe)

  To process "sourcefile.html" and write the relocated version to
  "destfile.html", type

      relochtml <sourcefile.html >destfile.html


fifos.pas

  a Unit which implements a simple FIFO buffer object.  Used by 
  relochtml.pas.


The following shell script may be useful to relocate a whole tree
containing HTML files (invoke with -R for recursive calls):

8<-----------------------------------------------------------------------------

#!/bin/sh
for x in *.html; do \
  if test -f $x; then
    if ! test -L $x; then
      relochtml /gnu <$x >$x.TMP; \
      mv $x.TMP $x; \
    fi; \
  fi; \
done
if test $1x = -Rx; then \
  for x in *; do
    if test -d $x; then
      cd $x; \
      reloc -R; \
      cd ..; \
    fi; \
  done; \
fi

