#!/bin/bash
#
# mhtml -- a program to mirror html pages recursively
# Copyright (C) 1996  Kevin M. Bealer
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version
# 2 of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
# USA.
# 
# You can send mail to the author at <kmb203@psu.edu> or:
# 
# Kevin M Bealer
# 94 Bowers Road
# Mertztown, PA 19539
#

# You can modify this file to use whatever method necessary
# fetch remote pages.  The distributed file uses the lynx web
# browser to do the fetch (lynx is not included).  This will
# probably be changed eventually.
#
# You can uncomment some of the following to force regets until
# there is no error code.
#
# Yes I know these error messages are rather barbaric...

remote=$1
local=$2

echo $remote
echo $local

test -z $local && echo bad
test -z $remote && echo badbadbad
test -z $3 || echo gbadgbad

test -f $local && exit 0

#while ! 
lynx -source $remote > $local
#do
#  echo oh well.
#done

sleep 1

# We will be forging as we go.
#test -f $remote && echo $remote > $local
#joe $local
